Rexiology@MSDN : C#: What does it mean about statement "int? varA = 3;" ?
Not having had the luxury of working in .NET 2.0 yet, a plethora of legacy 1.1 and Sharepoint 2003 and now SAP has prevented my migration I never knew about nullable types, sure I’d heard about nullable types, in fact I hated the idea, to me its just lazy, check your damn variables for DBNull I say. Ok ok so sometimes you want to know something is un-set e.g. a trisate boolean of true or false or undefined (null).
But since we have them its worth knowing what they are and how to use them so in this article look for
int? varA =null;
And of course
int result1 = varA ?? varB;
Don’t you think it just looks nasty.
Rexiology@MSDN : C#: What does it mean about statement “int? varA = 3;” ?
Technorati tags: c#
Categories: development