# The Problem With Code Folding

**URL:** <https://discourse.codinghorror.com/t/the-problem-with-code-folding/294>\
**Category:** blog\
**Created:** [July 6, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/the-problem-with-code-folding/294 "2008-07-06T00:00:00Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![Rob](https://discourse.codinghorror.com/letter_avatar_proxy/v2/letter/r/838e76/32.png) [@Rob](https://discourse.codinghorror.com/u/Rob)\
**Post date:** [July 7, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/the-problem-with-code-folding/294/31 "2008-07-07T00:00:00Z")

</div>

Now, this is interesting, because I tend to use #region more to HIDE THE CRAP (XML documentation etc, long list of attributes etc.) making it easier to see the important code..

I do tend to roll up the properties as well. Since 99% of the time the getters/setters aren’t really doing much in themselves.

e.g.

```
    #region Attributes
    [Browsable(false)]
    [MergableProperty(false)]
    [DefaultValue(null)]
    [PersistenceMode(PersistenceMode.InnerProperty)]
    [TemplateContainer(typeof(MyType))]
    [TemplateInstance(TemplateInstance.Single)] 
    #endregion
    public ITemplate ContentTemplate
    {
        get { return _temp; }
        set { _temp = value; }
    }

```

Becomes:

```
    Attributes
    public ITemplate ContentTemplate
    {
        get { return _temp; }
        set { _temp = value; }
    }

```

Much nicer :)

---

_[View the full topic](https://discourse.codinghorror.com/t/the-problem-with-code-folding/294)._
