ConfigurationManager.Item(Object, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 Configuration 集合的对象 ConfigurationManager 。
EnvDTE::Configuration Item(winrt::Windows::Foundation::IInspectable const & index, std::wstring const & Platform = "");
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE.Configuration Item (object index, string Platform = "");
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj * string -> EnvDTE.Configuration
Public Function Item (index As Object, Optional Platform As String = "") As Configuration
参数
- index
- Object
必需。 绝对索引、GUID 字符串或配置的名称。
- Platform
- String
可选。 平台的名称。
返回
Configuration 对象。
- 属性
示例
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
注解
Item 返回中的配置 Index 。 此对象按行主顺序排列,项目/项目项配置名称构成行,平台名称构成列。
如果 index 为 Long 数据类型,则它是矩阵中的行主索引,而 Platform 参数被忽略。 如果 index 是字符串数据类型,则它是项目/项目项配置名称,并且 Platform 必须作为平台名称提供。 对于不支持任何平台的项目,此参数可以是空字符串。