ContextAttributes.Item 方法

返回 ContextAttribute 对象,它是 ContextAttributes 集合中一个项。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
Function Item ( _
    index As Object _
) As ContextAttribute
ContextAttribute Item(
    Object index
)
ContextAttribute^ Item(
    Object^ index
)
abstract Item : 
        index:Object -> ContextAttribute 
function Item(
    index : Object
) : ContextAttribute

参数

返回值

类型:EnvDTE.ContextAttribute
ContextAttribute 对象。

备注

传递给 index 的值是一个整数,它可以是 ContextAttribute 对象在其 ContextAttributes 集合中的索引,也可以是一个字符串值,等价于集合中 ContextAttribute 的名称。

如果集合找不到对应于索引值的对象,则 Item 方法引发 ArgumentException 异常。

.NET Framework 安全性

请参见

参考

ContextAttributes 接口

EnvDTE 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例