Configurations.Type 属性

定义

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

public:
 property EnvDTE::vsConfigurationType Type { EnvDTE::vsConfigurationType get(); };
public:
 property EnvDTE::vsConfigurationType Type { EnvDTE::vsConfigurationType get(); };
[System.Runtime.InteropServices.DispId(5)]
public EnvDTE.vsConfigurationType Type { [System.Runtime.InteropServices.DispId(5)] get; }
[<System.Runtime.InteropServices.DispId(5)>]
[<get: System.Runtime.InteropServices.DispId(5)>]
member this.Type : EnvDTE.vsConfigurationType
Public ReadOnly Property Type As vsConfigurationType

属性值

vsConfigurationType

一个 vsConfigurationType 常数,指定配置的类型。

属性

示例

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);  
    }  
}  

注解

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

适用于