Configurations.Type 属性

获取一个指示配置类型的常数。

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

语法

声明
ReadOnly Property Type As vsConfigurationType
vsConfigurationType Type { get; }
property vsConfigurationType Type {
    vsConfigurationType get ();
}
abstract Type : vsConfigurationType with get
function get Type () : vsConfigurationType

属性值

类型:EnvDTE.vsConfigurationType
一个 vsConfigurationType 常数,它指定配置的类型。

备注

对于配置,Type 返回一个常数,该常数指示配置集合是一个特定配置名的一行配置,还是一个给定平台的一列配置。 如果该窗口属于一个环境工具,则 Type 标识该工具。 如果该窗口是提供软件包的工具或文档窗口,则 Type 为 vsWindowTypeToolWindowvsWindowTypeDocument,并且 ObjectKind 属性指示软件包特定的类型信息。

示例

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 type of configuration.
            MessageBox.Show(configs.Type.ToString());
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework 安全性

请参阅

参考

Configurations 接口

EnvDTE 命名空间

其他资源

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