Wednesday, March 16, 2011

Null-coalescing operator, Double question mark( ??) in C#

        int? x = null;
        Console.WriteLine(x?? 100);
Equal:
var test = (x == null) ? x : 100;



Reference:

No comments:

Post a Comment