Allow #region blocks to be indented much like they are in C#
In C# you can indent a #region block so that the region flows with the layout of your code. Unless I am missing something, this is not the case in VB.
public class MyClass
Public Class MyClass
Thanks for the great suggestion. I agree that it would be nice to see these indented properly. I honestly couldn’t tell you the reason for this design choice but it applies to all preprocessing directives. Having said that, our team owns both the VB and C# code editor experiences and as we’re rebuilding them as part of Project “Roslyn” we’re trying to be on the look out for opportunities to make the experiences more consistent where it makes sense – this looks to me like one of those cases. The “Roslyn” based editing experience is not planned to be in the next release of Visual Studio but it’s certainly not to early to look at improving this. I’ll follow up with the right folks to see if I can make this happen :)
-Anthony D. Green, Program Manager, Visual Basic & C# Languages Team
How about allow the "normal" hide/show +/- in front of functions/subs that are enclosed in #IF directives? No reason to treat the code inside differently, just because (for the moment) the #IF evaluates to False and all the code in between is gray'd out. Now I just want to look at one of the functions inside the gray area... actually, the +/- are still there in VS 2012 right after changing the controlling #CONST from True to False... but one click inside the gray range and *poof* they disappear.
No no no no no no no!!!! Don't you dare make VB indent regions... that's what makes them readable! I want to find a way to STOP C# from indenting them as they look so bad and UN-readable like that - you can't tell at a glance where the regions start or end - they're just mixed up with all the methods!
David Blaine Fullerton commented
Then, you simply, change of language. Vb it's Vb, if was equal C#, then don't be VB. Choose....
Gregory Gammon commented
Formatting didn't seem to work on that one :(.