CodeCompileUnit.StartDirectives 属性
定义
获取包含开始指令的 CodeDirectiveCollection 对象。Gets a CodeDirectiveCollection object containing start directives.
public:
property System::CodeDom::CodeDirectiveCollection ^ StartDirectives { System::CodeDom::CodeDirectiveCollection ^ get(); };
public System.CodeDom.CodeDirectiveCollection StartDirectives { get; }
member this.StartDirectives : System.CodeDom.CodeDirectiveCollection
Public ReadOnly Property StartDirectives As CodeDirectiveCollection
属性值
包含开始指令的 CodeDirectiveCollection 对象。A CodeDirectiveCollection object containing start directives.
示例
下面的代码示例演示属性的用法 StartDirectives 。The following code example shows the use of the StartDirectives property. 此示例是为类提供的更大示例的一部分 CodeRegionDirective 。This example is part of a larger example provided for the CodeRegionDirective class.
cu.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start,
"Compile Unit Region"));
cu.StartDirectives.Add(New CodeRegionDirective(CodeRegionMode.Start, "Compile Unit Region"))