Just say No! to C# Regions(extractmethod.wordpress.com)

submitted by FlukeFanFlukeFan(279) 3 years, 1 month ago

You need a language construct so that your IDE can help you hide your big messy code block from you (because it’s just so hideous, you don’t even want to look at it anymore)?

2 comments |category: |Views: 813

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by aquinasaquinas(20) 3 years, 1 month ago 0

Religious war. I like having all my constants that I am only using within the class inside a region. I don't need to see them ever again, but they need to be in the class. You want to see them all the time? Good. Don't use regions. And by the way, "Just say no to green comment strings!"

Reply

posted by software.developersoftware.developer(8) 3 years, 1 month ago 0

I agree with aquinas. Sometimes there is no escaping a ginormous section of homogonous code.
And rather than stare at it all the time, region it off and "encapsulate" it with a meaningful #region name.
As with anything, too many #regions can be a problem. I personally don't use a region to hide only a handfull of code where a comment would do just as well.

/religiouswar

Reply

information Login or create an account to comment on this story