Conditional Operators
The C# spceification declares the Conditional Operator (14.12), otherwise known as the Ternary Operator. It means that you can do this:
int i = (boolean_expression ? j : k);
This is great. Less readable, but great.
A couple of days ago, I thought: "why not go another step?" and came up with this:
int i = try { int.Parse(str); } catch { 0; }
This would help remove the "Use of unassigned local variable" errors and make the code less complicated.
Of course, the usual cases of "if there is more than one line in there, write it in the expanded form" apply.
I'd love to hear comments and suggestions.