مشاركة عبر


BuildDependencies.Item أسلوب

يحصل على مفهرس عضو BuildDependenciesمجموعة.

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

بناء الجملة

'إقرار
Function Item ( _
    index As Object _
) As BuildDependency
BuildDependency Item(
    Object index
)
BuildDependency^ Item(
    [InAttribute] Object^ index
)
abstract Item : 
        index:Object -> BuildDependency 
function Item(
    index : Object
) : BuildDependency

المعلمات

  • index
    النوع: System.Object
    مطلوبة.فهرس العنصر للعودة.

القيمة المُرجعة

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

ملاحظات

Itemthrows أسلوب ArgumentExceptionاستثناء إذا تعذر العثور على المجموعة الكائن الذي يتوافق مع إلى القيمة الفهرس.

أمثلة

public void Example(DTE2 dte)
{
   try
   {
      BuildDependencies bldDepends;
      BuildDependency bldDependency = null;

      // Get the BuildDependencies in open solution.
      bldDepends = dte.Solution.SolutionBuild.BuildDependencies;
      if (bldDepends.Count > 0) // assign the BuildDependency
         bldDependency = bldDepends.Item(bldDepends.Count);
      // Show the BuildDependency returned by the Item property.
      MessageBox.Show(bldDependency.Project.Name);
      // Show the BuildDependencies top-level object.
      MessageBox.Show(bldDepends.DTE.Name);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}

أمن NET Framework.

راجع أيضًَا

المرجع

BuildDependencies واجهة

BuildDependencies الأعضاء

EnvDTE مساحة الاسم

موارد أخرى

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