다음을 통해 공유


BuildDependencies.Count 속성

BuildDependencies 컬렉션의 개체 수를 나타내는 값을 반환합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
    int get ();
}
abstract Count : int with get
function get Count () : int

속성 값

형식: Int32
BuildDependencies 컬렉션의 개체 수를 나타내는 정수 값입니다.

예제

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

.NET Framework 보안

참고 항목

참조

BuildDependencies 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행