Posted by Joseph on 10/20/2004 1:09 AM | Comments (5)
If you find yourself putting #regions inside a method (or if you're a VB.NET programmer - wishing that you could do such a thing) you might want to think about making that a separate method.

Comments

Aydsman
Aydsman on 10/20/2004 9:16 AM You know - that's a seriously good point.  I do *like* my regions though.  I love the abstraction of "CTRL+M+O"-ing away all the code to see those serene, quiet, gentle grey boxes.



My only gripe with them is that nested regions all left-align, they don't - well - nest Smile



But this is coming from the layout-nazi himself.
JosephCooney
JosephCooney on 10/20/2004 9:39 AM It is true Aydsman - your love of regions knows no bounds.
Greg Low
Greg Low on 10/21/2004 4:25 AM Hi Joseph,



Yep, feel the same but I still wish I could use regions within methods in VB.NET...



And yep, Aydsman, I sure wish there was a way to nest them.



Regards,



Greg
Dan Green
Dan Green on 11/17/2004 9:03 PM I reckon instrumentation is a (the?) valid reason for intra-method region methinks.



I have this pattern:



#region Instrumentation

#line hidden

if (TracingAtLevel(3))

    Tracing.Write(CalculateTraceMessage())

#line default

#endregion
JosephCooney
JosephCooney on 11/18/2004 6:31 AM You might be right Dan. Mitch said he felt the same way.
Comments are closed