用于操作代码元素的特性。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
<GuidAttribute("0CFBC2BE-0D4E-11D3-8997-00C04F688DDE")> _
Public Interface CodeAttribute
[GuidAttribute("0CFBC2BE-0D4E-11D3-8997-00C04F688DDE")]
public interface CodeAttribute
[GuidAttribute(L"0CFBC2BE-0D4E-11D3-8997-00C04F688DDE")]
public interface class CodeAttribute
[<GuidAttribute("0CFBC2BE-0D4E-11D3-8997-00C04F688DDE")>]
type CodeAttribute =  interface end
public interface CodeAttribute
CodeAttribute 类型公开以下成员。
属性
| 名称 | 说明 | |
|---|---|---|
![]()  | 
Children | 返回一个此代码的 CodeAttribute 构造中所包含对象的集合。 | 
![]()  | 
Collection | 获取包含支持此属性的 CodeAttribute 对象的集合。 | 
![]()  | 
DTE | 获取顶级扩展性对象。 | 
![]()  | 
EndPoint | 获取表示代码项结束位置的文本点。 | 
![]()  | 
Extender | 返回请求的扩展程序对象。 | 
![]()  | 
ExtenderCATID | 获取对象的扩展程序类别 ID (CATID)。 | 
![]()  | 
ExtenderNames | 获取对象的可用扩展程序的列表。 | 
![]()  | 
FullName | 获取 CodeAttribute 对象文件的完整路径和名称。 | 
![]()  | 
InfoLocation | 描述代码模型的功能。 | 
![]()  | 
IsCodeType | 指示是否可以从此 CodeAttribute 对象获取 CodeType 对象。 | 
![]()  | 
Kind | 获取一个指示对象类型的枚举。 | 
![]()  | 
Language | 获取用于创作代码的编程语言。 | 
![]()  | 
Name | 设置或获取 CodeAttribute 的名称。 | 
![]()  | 
Parent | 获取给定 CodeAttribute 对象的直接父对象。 | 
![]()  | 
ProjectItem | 获取与 CodeAttribute 对象关联的 ProjectItem。 | 
![]()  | 
StartPoint | 获取一个 TextPoint 对象,该对象定义代码项的开始位置。 | 
![]()  | 
Value | 设置或获取该对象的数据值。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
![]()  | 
Delete | 移除当前的 CodeAttribute。 | 
![]()  | 
GetEndPoint | 返回标记代码元素定义的末尾的 TextPoint 对象。 | 
![]()  | 
GetStartPoint | 返回指定代码元素定义的开始位置的 TextPoint。 | 
页首
备注
CodeAttribute 对象表示与代码元素关联的 COM 元数据特性。可以使用 CodeAttribute 对象获取和设置代码特性的值。
 说明 | 
|---|
在进行某些类型的编辑之后,代码模型元素(如类、结构、函数、特性、委托等)的值可能是非确定性的,这意味着不能指望它们的值总是保持不变。有关更多信息,请参见 使用代码模型查找代码 (Visual Basic) 中的“代码模型元素的值可能会更改”一节。  | 
.gif)
.gif)
说明