Aracılığıyla paylaş


Documents.Parent Özellik

Hemen üst nesnesi alır bir Documents koleksiyonu.

Ad alanı:  EnvDTE
Derleme:  EnvDTE (EnvDTE.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Parent As DTE
DTE Parent { get; }
property DTE^ Parent {
    DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE

Özellik Değeri

Tür: EnvDTE.DTE
DTE nesnesi

Notlar

Parent Özelliği hemen üst nesne veya koleksiyon döndürür.

Örnekler

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

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Documents Arabirim

EnvDTE Ad Alanı

Diğer Kaynaklar

Nasıl yapılır: derlemek ve Otomasyon nesne modeli kod örneklerini çalıştırmak