I can hardly believe the C# developers didnt thought about that. I dislike that there doesnt exist better way to create one-time disposable variables, as we have to declare them in blocks:
using( XYZ x = smth){
ShowForm(Color.Blue, x, "30px");
......
}
for me, placing the lines in brackets & placing declarations in-front of code,
is visually unpleasent (as it reminds me to be if {} else {}
block ).
so, does there exist any alternative way to create self-disposing variables inline, like:
ShowForm(Color.Blue, (using x=smth) x , "30px");
?