CodeEvent.Attributes 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取 CodeElements 此代码事件元素的特性集合。
public:
property EnvDTE::CodeElements ^ Attributes { EnvDTE::CodeElements ^ get(); };
[System.Runtime.InteropServices.DispId(33)]
public EnvDTE.CodeElements Attributes { [System.Runtime.InteropServices.DispId(33)] get; }
[<System.Runtime.InteropServices.DispId(33)>]
[<get: System.Runtime.InteropServices.DispId(33)>]
member this.Attributes : EnvDTE.CodeElements
Public ReadOnly Property Attributes As CodeElements
属性值
一个 CodeElements 集合。
- 属性
示例
下面的示例演示如何使用 Attributes 属性。
public static void Attributes(EnvDTE80.DTE2 dte)
{
TextSelection objTextSel;
EnvDTE80.CodeEvent codeEvent;
objTextSel = (TextSelection)dte.ActiveDocument.Selection;
codeEvent = (EnvDTE80.CodeEvent)objTextSel.ActivePoint.get_CodeElement(vsCMElement.vsCMElementEvent);
string str = "";
foreach (CodeElement ce in codeEvent.Attributes)
str += "\n" + ce.Name;
MessageBox.Show("\nAttributes property: " +
str, "Testing CodeEvent");
}