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
JosephCooney
It is true Aydsman - your love of regions knows no bounds.
20/10/2004 2:39:00 PM
Greg Low
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
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
21/10/2004 9:25:00 AM
Dan Green
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
I have this pattern:
#region Instrumentation
#line hidden
if (TracingAtLevel(3))
Tracing.Write(CalculateTraceMessage())
#line default
#endregion
18/11/2004 2:03:00 AM
JosephCooney
You might be right Dan. Mitch said he felt the same way.
18/11/2004 11:31:00 AM
My only gripe with them is that nested regions all left-align, they don’t - well - nest :)
But this is coming from the layout-nazi himself.