LANGUAGE
Nullable value type
A nullable value type can represent either a value of its underlying type or no value. HasValue distinguishes missing from a present zero.
Formal Syntax & Structure
csharp syntaxcsharp
int? <identifier> = null;Working Example
Example Snippetcsharp
int? count = 0;System.Console.WriteLine(count.HasValue);