Click here to Skip to main content
15,501,490 members

Comments by dzCepheus (Top 1 by date)

dzCepheus 27-May-11 13:30pm View     CRLF
It'd be an essentially useless addition, but It'd be interesting to see the 'using' statement overloaded for creating a scope: using { // code in a child scope of the method body here } But again, it'd be pointless since you get the same thing with just the braces. I agree that it does look a little sparse that way. One place I use this a lot are in switches: switch (variable) { case 1: { // ** - child scope for local variables // Case 1 code here break; } case 2: { // etc... break; } } Bad programming practice, yes, but I use this for quick programs where I'm more interested in getting something done right now than I am in a sustainable architecture.