A nullable type is a data type is that contains the defined data type or the null value.
This nullable type concept is not compatible with “var”.
Any data type can be declared nullable type with the help of operator “?”.
For example, the following code declares the int ‘i’ as a null.
- int? i = null;
As discussed in the previous section “var” is not compatible with nullable types. So, if you declare the following, you will get an error.
- var? i = null;