A little known feature that was added to the C# language in version 2.0 was the ?? operator. (MSDN link) .
int y = if (x!=null) return x; else return -1;
Can now be re-written as:
int y = x ?? -1;
From the link above:
“The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand”