PDA

View Full Version : construtor limit


Csneeky
05-19-2004, 02:40 PM
anyone know a clean work around for the 1 constructor function limit....something that would emulate more than one constructor?

Initial thoughts are just to use the Arguments array, but I would like something that had strict parameter requirements. Maybe throwing an exception when evaluating the Arguments array?

Thoughts?

senocular
05-19-2004, 02:48 PM
the Arguments array is about your best bet. That or just checking types of passed arguments (sometimes you can get away with only checked the first, though it depends on your setup) and calling respective methods to react accordingly.