Just because I always forget this...the C# null Coalescing operator:
Sample below shamelessly stolen from here...
// Variant 1: Using a full if/else clause
if (anObject != null)
Â anotherObject = anObject;
Â anotherObject = new MyClass();
// Variant 2: Using the ?/: conditional operator
MyClass anotherObject = anObject != null ? anObject : new MyClass();
// Variant 3: Using the ?? operator
MyClass anotherObject = anObject ?? new MyClass();
Not really back but this was just too great a link to miss, the page is called '25 Photographs Taken at the Exact Right Time'Â and they're not kidding!
Anyway, I'm on theÂ path I want to be and I'll get back to this blog soon...(cryptic enough for ya? )Â
P.S., the title is a reference to this show...just realized that non brits wouldn't get it...