How do you feel about code folding?

Question :

How do you feel about code folding?,

Answer :

For those of you in the Visual Studio environment, how do you feel about wrapping any of your code in #regions? (or if any other IDE has something similar…)

,

9 out of 10 times, code folding means that you have failed to use the for what its worth.
I more or less feel the same thing about partial classes. If you have a piece of code you think is too big you need to chop it up in manageable (and reusable) parts, not hide or split it up.
It will bite you the next time someone needs to change it, and cannot see the logic hidden in a 250 line monster of a method.

Read More  IL level code debugger

Whenever you can, pull some code out of the main class, and into a helper or factory class.

foreach (var item in Items)  {      //.. 100 lines of validation and data logic..  }  

is not as readable as

foreach (var item in Items)  {      if (ValidatorClass.Validate(item))          RepositoryClass.Update(item);  }  

My $0.02 anyways.

That’s the answer How do you feel about code folding?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  YUI drag&drop proxy drag

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you