Configuration.Type Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft eine Konstante ab, die den Objekttyp darstellt.
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
Eigenschaftswert
Eine- vsConfigurationType Konstante, die den Typ der Konfiguration angibt.
- Attribute
Beispiele
public void CodeExample(DTE2 dte, AddIn addin)
{ // Make sure you have a solution loaded into Visual Studio
// before running the following example.
try
{
Project prj;
Configuration config;
ConfigurationManager configmgr;
if (dte.Solution.Projects.Count > 0)
{
prj = dte.Solution.Projects.Item(1);
config = prj.ConfigurationManager.ActiveConfiguration;
// Returning the Configuration type constant.
MessageBox.Show(config.Type.ToString());
// Returns the ConfigurationManager containing the active configuration.
configmgr = config.Collection;
// Returns the application containing this active configuration.
MessageBox.Show(config.DTE.Name);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Hinweise
Gibt für Konfigurationen Type eine-Konstante zurück, die angibt, ob die Auflistung von Konfigurationen eine Zeile von Konfigurationen für einen bestimmten Konfigurations Namen oder eine Spalte mit Konfigurationen für eine bestimmte Plattform ist. Wenn das Fenster zu einem Umgebungs Tool gehört, Type identifiziert das Tool. Wenn das Fenster für ein vom Paket bereitgestelltes Tool oder Dokument Fenster gilt, Type ist entweder vsWindowTypeToolWindow oder vsWindowTypeDocument , und die- ObjectKind Eigenschaft gibt Paket spezifische Typinformationen an.