C# Nullables

Nullables 

C# provides a special data types, the nullable types, to which you can assign normal range of values as well
as null values.
For example, you can store any value from -2,147,483,648 to 2,147,483,647 or null in a Nullable< Int32 > variable.
Similarly, you can assign true, false or null in a Nullable< bool > variable. Syntax for declaring a nullable type is as
follows:
 
< data_type> ? <variable_name> = null;
 
The following example demonstrates use of nullable data types:
 
 
 
The Null Coalescing Operator (??)

The null coalescing operator is used with the nullable value types and reference types. It is used for converting an
operand to the type of another nullable (or not) value type operand, where an implicit conversion is possible.
If the value of the first operand is null, then the operator returns the value of the second operand, other wise it returns
the value of the first operand. The following example explains this: 
 
 
 
 
 
I Hope this blog will help you to understand Nullables (?) and Null Coalescing Operator(??).