Had some interesting feedback from readers who used other ways of disabling code blocks. It made me think that I should probably have said something like "Of course, this - as usual with Visual Studio - isn't the only way. It just happens to be the way I find easiest, so I thought I'd pass it along to you. "
You can of course use your mouse and navigate to the Edit menu and:
- Select Edit
- Comment Selection
or even use the hotkey combo of Alt & e - v - m .
There's even a fairly contrived (and not recommended by me!) method I know of where you insert # symbols, which will act as compiler directives at the start and end of the block you want to leave uncompiled and therefore unrun - (unrun???) shurely shum mishtake?
Someone suggested inserting a GoTo statement at the start of the block you want to ignore. I could just about live with the suggestion of inserting GoTo statements if it wasn't for the fact that I've spent the last three years training myself out of using 'em. Like a Pavlovian dog, I now get a nasty jolt like 100 volts through my knuckles any time I find myself starting to type GoT..... Damn, Ouch! There it goes again!
Anyway, each to his own. The three keystroke combo works fine for me.