Pencho Popadiyn  photo for the challenge  Posted on August 24, 2012 at 09:59
Mother of casting (C# code): if ( ( ( Person )sender ).Caps.HasValue && ( ( Person )sender ).Caps.Value && ( ( Person )sender ).FullName == "SomeName" ) { Person senderField = ( ( Person )sender ); }
Mother of casting (C# code): if ( ( ( Person )sender ).Caps.HasValue && ( ( Person )sender ).Caps.Value && ( ( Person )sender ).FullName == "SomeName" ) { Person senderField = ( ( Person )sender ); }
Comment 2
Pencho Popadiyn 26/08/2012
I won't comment that this code might throw NullReference :)
Emil Stoychev 31/08/2012
Actually, I think that if the code doesn't throw NullReference, then the "if" is most probably useless :-)


Please, to comment.