Articles → CSHARP → Nullable Datatypes
Nullable Datatypes
- HasValue → Set to true if there is a value stored, else false
- Value → Get the value of variable
int? i = null;
int j;
j = i;
int? i;
int j = 5;
i = j;
Lifted Operators
int? a = 3;
int b = 4;
int? c = a * b; // valid
int c = a * b; //invalid
Removing Nullability
int? i = null;
int j = 4;
int? c = i??j;