Compartir a través de


BuildDependency.Collection Property

Definition

Returns the BuildDependencies collection containing the BuildDependency object that supports this property.

public:
 property EnvDTE::BuildDependencies ^ Collection { EnvDTE::BuildDependencies ^ get(); };
[System.Runtime.InteropServices.DispId(2)]
public EnvDTE.BuildDependencies Collection { [System.Runtime.InteropServices.DispId(2)] get; }
[<System.Runtime.InteropServices.DispId(2)>]
[<get: System.Runtime.InteropServices.DispId(2)>]
member this.Collection : EnvDTE.BuildDependencies
Public ReadOnly Property Collection As BuildDependencies

Property Value

A BuildDependencies collection.

Attributes

Examples

public void Example(DTE2 dte, AddIn addin)  
{  
   try  
   {  
      // Make sure there is at least one BuildDependency in your  
      // solution to run this code.  
      BuildDependencies bldDepends;  
      BuildDependency bldDependency = null;  

      bldDepends = dte.Solution.SolutionBuild.BuildDependencies;  
      if (bldDepends.Count > 0)  
         bldDependency = bldDepends.Item(bldDepends.Count);  

      //   
      if (bldDependency.Collection.Count > 0)  
         MessageBox.Show(bldDependency.DTE.Name);  
   }  
   catch (Exception ex)  
   {  
      MessageBox.Show(ex.Message);  
   }  
}  

Applies to