Wednesday, July 23, 2008

?? operator in C#

I found this C# today it's rock !!

string thisIsANull = null;
string thisIsANullCheck = thisIsANull ?? "";

thisIsANullCheck is set to ""

No comments: