On Wednesday, March 07, 2012 20:44:59 Chad J wrote: > On 03/07/2012 10:21 AM, Steven Schveighoffer wrote: > > You can use sentinels other than null. > > > > -Steve > > Example?
Create an instance of the class which is immutable and represents an invalid value. You could check whether something is that value with the is operator, since there's only one of it. You could even make it a derived class and have all of its functions throw a particular exception if someone tries to call them. - Jonathan M Davis