Documents.Count الخاصية
الحصول على القيمة تشير إلى عدد الكائنات في Documentsمجموعة.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
ReadOnly Property Count As Integer
Get
int Count { get; }
property int Count {
int get ();
}
abstract Count : int
function get Count () : int
قيمة الخاصية
النوع: System.Int32
القيمة عدد صحيح يشير إلى عدد الكائنات في Documentsمجموعة.
أمثلة
public void Example(DTE2 dte)
{
try
{
// Run this code after opening up 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.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.
راجع أيضًَا
المرجع
موارد أخرى
كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي