in C# I use 'try catch' block in one single line:
Code: Select all
try { ... } catch(Exception ex) { ... }
*****
next question:
this is possible code in X#
Code: Select all
VAR a := 0
a += 1, a += 2
Code: Select all
VAR a := 0, a += 1, a += 2
another possible one-liner in c#:
Code: Select all
foreach(var p in ps) /* do something*/;
*****
Sometimes one-liners are more readable.
Regards,
Stefan