ConfigurationManager.Item 方法

返回 ConfigurationManager 集合中的 Configuration 对象。

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

语法

声明
Function Item ( _
    index As Object, _
    Platform As String _
) As Configuration
Configuration Item(
    Object index,
    string Platform
)
Configuration^ Item(
    [InAttribute] Object^ index, 
    String^ Platform
)
abstract Item : 
        index:Object * 
        Platform:string -> Configuration 
function Item(
    index : Object, 
    Platform : String
) : Configuration

参数

  • index
    类型:System.Object
    必选。绝对索引、GUID 字符串或配置名。

返回值

类型:EnvDTE.Configuration
一个 Configuration 对象。

备注

Item 返回 Index 处的配置。 此对象为行优先顺序,并且由项目/项目项配置名组成行,由平台名组成列。

如果 index 为 Long 数据类型,则它是矩阵的行优先索引,并且忽略 Platform 参数。 如果 index 为 String 数据类型,则它是一个项目/项目项配置名,并且必须提供 Platform 作为平台名。 对于不支持任何平台的项目,此参数可以为一个空字符串。

示例

Sub ItemExample()
   ' Before running, load a project.
   ' Set references to all necessary objects.
   Dim CM As ConfigurationManager = DTE.Solution.Projects.Item(1).ConfigurationManager
   ' List the configuration name used for the current project.
   MsgBox(CM.Item(2).ConfigurationName)
End Sub

.NET Framework 安全性

请参见

参考

ConfigurationManager 接口

EnvDTE 命名空间