次の方法で共有


BuildDependencies.Count Property

Definition

Returns a value indicating the number of objects in the BuildDependencies collection.

public:
 property int Count { int get(); };
public:
 property int Count { int get(); };
[System.Runtime.InteropServices.DispId(3)]
public int Count { [System.Runtime.InteropServices.DispId(3)] get; }
[<System.Runtime.InteropServices.DispId(3)>]
[<get: System.Runtime.InteropServices.DispId(3)>]
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value

An integer value representing the number of objects in the BuildDependencies collection.

Attributes

Examples

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

Applies to