Interviews1 answer
What are nullable types in .NET?
1 Answer
The HasValue property returns true if the variable contains a value, or false if it is null.
The Value property returns a value if one is assigned. ...
The default value for HasValue is false. ...
You can also use the == and != operators with a nullable type, as shown in the following example: if (x != null) y = x;
Tushar KumarPosted Nov 6, 2014, 8:07 PM EST