How we represent Null-Coalescing operator : ??
This is a replacement for ternary operator. If we want to check null value using ternary then we do :
Using Null-Coalescing :
Saurabh Singh
www.isaurabh.com
This is a replacement for ternary operator. If we want to check null value using ternary then we do :
string myString = null; string value = myString == null ? "My string is null" : myString ;
Using Null-Coalescing :
string value = myString ?? "My string is null";
Saurabh Singh
www.isaurabh.com