O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

24.5. #region and #endregion

You can mark arbitrary sections of your code using region names using the #region and #endregion directives. These directives are totally ignored by most compilers but may be useful for C# IDEs (such as VS .NET), which may use regions defined this way for special display purposes.

An IDE may want to demarcate a source file into several regions and insert these region directives 'behind the scenes'. When the source is displayed within the IDE, these directives are usually not displayed, but used internally by the IDE.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required