G
Guest
Hi,
I want to create a type that behaves like in integer but only allows
assignment of say 3 digit integers where attempts to assign values greater or
loess will throw an exception. E.g. int threeDigitInteget = 7; will throw an
exception.
I can achive this behaviour through the new types constructor but cannot
work out how to intercept assignments using the = assignment operator.
If any know has a natty example or could point me to some documentation I'd
be really appreciative.
Ta in adv.,
Michael
I want to create a type that behaves like in integer but only allows
assignment of say 3 digit integers where attempts to assign values greater or
loess will throw an exception. E.g. int threeDigitInteget = 7; will throw an
exception.
I can achive this behaviour through the new types constructor but cannot
work out how to intercept assignments using the = assignment operator.
If any know has a natty example or could point me to some documentation I'd
be really appreciative.
Ta in adv.,
Michael