Nullable types in C#.

Nullable types are instances of the System.Nullable struct.  They are value types, though we can assign null to them. For example int? is a Nullable<Int32>. All nullable types have two values:

  1. The value of the data type.
  2. A boolean value that tells if value has been set(HasValue property).

DateTime also is value type, btw :)

Share this post:Tweet about this on TwitterShare on Facebook0Share on LinkedIn0Share on Google+0Share on Reddit0Email this to someoneDigg this