Share via


Configurations.Type-Eigenschaft

Ruft eine Konstante ab, die den Konfigurationstyp angibt.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

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

Eigenschaftswert

Typ: EnvDTE.vsConfigurationType
Eine vsConfigurationType-Konstante, die den Konfigurationstyp angibt.

Hinweise

Type gibt für Konfigurationen eine Konstante zurück, die Angaben darüber enthält, ob die Konfigurationsauflistung eine Konfigurationszeile für einen bestimmten Konfigurationsnamen oder eine Konfigurationsspalte für eine bestimmte Plattform ist. Wenn das Fenster zu einem Umgebungstool gehört, wird es von Type gekennzeichnet. Wenn das Fenster für ein Tool aus einem Toolpaket oder ein Dokumentfenster verwendet wird, lautet Type entweder vsWindowTypeToolWindow oder vsWindowTypeDocument, und die ObjectKind-Eigenschaft enthält paketspezifische Typinformationen.

Beispiele

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-Sicherheit

Siehe auch

Referenz

Configurations Schnittstelle

EnvDTE-Namespace

Weitere Ressourcen

Gewusst wie: Kompilieren und Ausführen der Codebeispiele für das Automatisierungsobjektmodell