JCooney.NET
Joseph Cooney's Weblog
Sign in
Home
Archive
Contact
Subscribe
<< Note to self: don't be so stupid
|
All about mobility >>
Coding rule of thumb
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.
Permalink
|
Comments RSS
Share it:
E-mail
|
Kick it!
|
DZone it!
|
del.icio.us
Related posts
CSS Zen Garden - thumbnail view
Mezzoblue (cultivator of the CSS Zen Garden) have this cool thumbnail view of the “offici...
FxCop Rule Libraries for ASP.NET?
I'm thinking about trying to use FxCop to analyze ASP.NET assemblies. Are there any rule libraries f...
$AU 30 later I have my Coding Horror T-Shirt
$AU 30 was all it took to turn my design into something wearable. I think it turned out quite well. ...
Comments
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
But this is coming from the layout-nazi himself.
JosephCooney
on 10/20/2004 9:39 AM
It is true Aydsman - your love of regions knows no bounds.
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
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
on 11/18/2004 6:31 AM
You might be right Dan. Mitch said he felt the same way.
Comments are closed
Search
Include comments in search
@josephcooney on twitter
July 26. 07:16
I'm not waitin' on a lady...I'm just waitin' on an android tablet from China :-(
July 21. 05:14
People say it's hard to understand azure...c'mon folks, it's just F0FFFF.
http://bit.ly/cgAVNK
July 21. 04:13
Just registered a new CodePlex project.
July 20. 04:12
Dear c:\programdata\ folder - why do you exist? Isn't AppData, Program Files, Program Files (x86), & c:\Windows\ enough places to put crap?
July 20. 03:54
Anyone else notice the iPhone-like toggle buttons in the configuration dialog for the VS2010 productivity power tools?
http://bit.ly/c3CIkP
follow me
RecentPosts
The Absolute Ironclad 100% Guaranteed and Fool-proof way to Get People to Read Your Email
Comments: 0
Microsoft Shows off iPhone-style toggle buttons in VS2010 Productivity Power Tools
Comments: 0
How to convince your BA to drop out of the Tony Montana School of Business Analysis
Comments: 5
Gruen Transfer vs. Microsoft Songsmith - never let truth get in the way of a good story
Comments: 0
The IT Department doesn’t Care about your Productivity
Comments: 9
I use anti-virus….but probably not for the reasons you think
Comments: 0
The sad (but inevitable) state of .NET Obfuscation
Comments: 1
Stephen Conroy Thinks You’re Stupid
Comments: 2
Word and WordPad
Comments: 2
Why don’t you try it and find out?
Comments: 1