Proprietà Documents.Parent
Ottiene l'oggetto padre immediato di un oggetto Documents raccolta.
Spazio dei nomi: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Sintassi
'Dichiarazione
ReadOnly Property Parent As DTE
DTE Parent { get; }
property DTE^ Parent {
DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE
Valore proprietà
Tipo: EnvDTE.DTE
In DTE oggetto.
Note
Parent la proprietà restituisce il padre immediato all'oggetto o alla raccolta.
Esempi
public void Example(DTE2 dte)
{
try
{
// Run this code after opening a project with at least one document.
Documents docs;
// Return the documents collection in the current application instance.
docs = dte.Documents;
// Show the number of open documents in the current application.
MessageBox.Show(docs.Count.ToString());
// Show the parent object of the current docs collection.
MessageBox.Show(docs.Parent.FullName);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per ulteriori informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.
Vedere anche
Riferimenti
Altre risorse
Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione