Wednesday, August 11, 2010

C# ?? (null-coalescing) operator

Hi, yesterday I learned something new: meet my new friend it is little known C# ?? (null-coalescing) operator. Now you think what it can do for you? Well this:
// xObject = null;
XClass xNewObject  = xObject ?? new XClass();
:) Read here and here.