Sunday, March 21, 2010

Nullable values in the C# language

Nullable value = 5;
value = null;
System.Diagnostics.Debug.Assert(value == null);


or

int? value = 5;
value = null;
System.Diagnostics.Debug.Assert(value == null);


Clear and easy, doesn't it? :)

No comments:

Search This Blog