ECMA-334 C# Language Specification

9.5.6: Region control

The region directives are used to explicitly mark regions of source code.

pp-region
pp-start-region conditional-sectionopt pp-end-region
pp-start-region
whitespaceopt # whitespaceopt region pp-message
pp-end-region
whitespaceopt # whitespaceopt endregion pp-message

No semantic meaning is attached to a region; regions are intended for use by the programmer or by automated tools to mark a section of source code. The message specified in a #region or #endregion directive likewise has no semantic meaning; it merely serves to identify the region. Matching #region and #endregion directives may have different pp-messages.

The lexical processing of a region:
#region  
...  
#endregion  
corresponds exactly to the lexical processing of a conditional compilation directive of the form:
#if true  
...  
#endif