Reply To: C# #region support

Product Compare Forums Multi-Edit Suggestions C# #region support Reply To: C# #region support

#3595
ReidSweatman
Participant

I’m not sure what you mean by this. I experimented with adding additional regions to your sample, and they all collapsed exactly as I expected. Now, since I’m a C++/x86 asm kinda guy, and not a C# kinda guy (I prefer the flat keys to the sharp ones, although I suppose you could consider C-sharp as the enharmonic equivalent to D-flat :) ), I assumed that regions can’t nest or overlap. I don’t know whether that’s a valid assumption, but I used it for testing.

Actually, I prefer the regular expression I first suggested, as it only displays “expand” headers for the beginnings of regions, and not for their ends. If you want the ends displayed also, use Dan’s expression. I didn’t see anything I could construe as regions being included in previous ones during collapse. If you could post a short sample of C# code that demonstrates your point, I’ll run through my tests again.