Condividi tramite


Proprietà Projects.Properties

Ottiene un insieme di tutte le proprietà relative all'insieme Projects.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
ReadOnly Property Properties As Properties
    Get
Properties Properties { get; }
property Properties^ Properties {
    Properties^ get ();
}
abstract Properties : Properties
function get Properties () : Properties

Valore proprietà

Tipo: EnvDTE.Properties
Insieme Properties.

Note

Alcune proprietà vengono esposte come proprietà di automazione nell'oggetto Solution o da oggetti ottenuti tramite la soluzione, quale l'oggetto SolutionBuild per le dipendenze di compilazione.

Esempi

public void CodeExample(DTE2 dte)
{  
    try
    {   // Open a project before running this sample
        Projects prjs = dte.Solution.Projects;
        string msg = "There are " + prjs.Count.ToString() + " projects in this collection.";
        msg += "\nThe application containing this Projects collection: " + prjs.DTE.Name;
        msg += "\nThe parent object of the Projects collection: " + prjs.Parent.Name;
        msg += "\nThe GUID representing the Projects type: " + prjs.Kind;
        if (prjs.Properties != null)
        {
            msg += "\nProperties:";
            foreach (Property prop in prjs.Properties)
            {
                msg += "\n   " + prop.Name;
            }
        }
        MessageBox.Show(msg, "Projects Collection");
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Projects Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione