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
C# LANGUAGE SPECIFICATION
68
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
The region directives are used to explicitly mark regions of source code.
pp-region::
pp-start-region conditional-sectionopt pp-end-region
C# LANGUAGE SPECIFICATION
68
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
博客介绍了 C# 中的区域控制指令,这些指令用于明确标记源代码区域,无语义含义,供程序员或自动化工具使用。还说明了 #region 和 #endregion 指令中的消息仅用于标识区域,且匹配的指令消息可不同,其词法处理与条件编译指令类似。
2944

被折叠的 条评论
为什么被折叠?



