region

J

Jung, William

#region and #endregion - is used to denote a block of code that's auto
generated?


#region Windows Form Designer generated code
#endregion
 
Z

zacks

#region and #endregion - is used to denote a block of code that's auto
generated?

                #region Windows Form Designer generated code
        #endregion

No, #region and #endregion is a way to group similar code together and
wrap this group of code in a region. You can then collapse the region
to hide the code.

It just so happens that the auto-generated code in a form's designer
partial class is also wrapped inside of a region.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top