Thursday, February 18, 2010

?? operator

string foo = null;
return foo ?? "bar"; // returns bar

string foo = "dummy";
return foo ?? "bar"; // returns dummy

No comments: