返回 Configurations 集合中的一个 Configuration 对象。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
Function Item ( _
    index As Object _
) As Configuration
Configuration Item(
    Object index
)
Configuration^ Item(
    [InAttribute] Object^ index
)
abstract Item : 
        index:Object -> Configuration 
function Item(
    index : Object
) : Configuration
参数
- index
 类型:System.Object
 必选。要返回的 Configuration 对象的索引。
返回值
类型:EnvDTE.Configuration
Configuration 对象。
备注
传递给 index 的值可以是一个整数,表示某个 Configuration 对象在 Configurations 集合中的索引,或者是该集合中某个 Configuration 对象的名称。
示例
public void CodeExample(DTE2 dte, AddIn addin)
{   
    try
    {   // Make sure you have a solution loaded into Visual Studio
        // before running the following example. Make sure the "Any CPU" 
        // option is marked in the Configuration Manager dialog box.
        Configurations configs = null;
        if (dte.Solution.Projects.Count > 0)
        {
            configs = dte.Solution.Projects.Item(1).ConfigurationManager.Platform("Any CPU");
            // Show the configuration name of the first item in 
            // the Configurations collection.
            MessageBox.Show(configs.Item(1).ConfigurationName);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。