مشاركة عبر


Documents.Parent الخاصية

يحصل على الأصل الفوري كائن من Documentsمجموعة.

مساحة الاسم:  EnvDTE
التجميع:  EnvDTE (في EnvDTE.dll)

بناء الجملة

'إقرار
ReadOnly Property Parent As DTE
    Get
DTE Parent { get; }
property DTE^ Parent {
    DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE

قيمة الخاصية

النوع: EnvDTE.DTE
كائن DTE .

ملاحظات

The Parent خاصية إرجاع the فوري parent إلى the كائن أو مجموعة.

أمثلة

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.

راجع أيضًَا

المرجع

Documents واجهة

Documents الأعضاء

EnvDTE مساحة الاسم

موارد أخرى

كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي