Sdílet prostřednictvím


BuildDependencies.Count – vlastnost

Vrátí hodnotu určující počet objektů v BuildDependencies kolekce.

Obor názvů:  EnvDTE
Sestavení:  EnvDTE (v EnvDTE.dll)

Syntaxe

'Deklarace
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
    int get ();
}
abstract Count : int with get
function get Count () : int

Hodnota vlastnosti

Typ: Int32
Celé číslo představující počet objektů BuildDependencies kolekce.

Příklady

public void Example(DTE2 dte)
{

   try
   {
      BuildDependencies bldDepends;
      SolutionBuild slnBuild;

      // Get the BuildDependencies in open solution.
      bldDepends = dte.Solution.SolutionBuild.BuildDependencies;
      // Get the SolutionBuild
      slnBuild = dte.Solution.SolutionBuild;
      // Show the number of Build Dependencies in open solution.
      MessageBox.Show("Number of dependencies: " + bldDepends.Count.ToString());
      // Prove that Build Dependencies parent object is a SolutionBuild object.
      if (bldDepends.Parent.GetType().Equals(slnBuild.GetType()))
         MessageBox.Show("Types match");
      else
         MessageBox.Show("Types do not match");
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}

Zabezpečení rozhraní .NET Framework

Viz také

Referenční dokumentace

BuildDependencies Rozhraní

EnvDTE – obor názvů

Další zdroje

Postupy: Kompilace a spuštění příkladů kódu objektu automatizace