dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Tuesday Sep 25th 2018 by Srinath M S

Language: .NET, Expertise: Beginner - Learn how to chain null comparisons to any level on an object.

Did you know you can chain null comparisons to any level on an object with ?? operator? See below for an example:

string inputString;

//set some value.

var multiEvaluationResult = inputString?? secondaryString ?? someOtherString;
Home
Mobile Site | Full Site