Share via


Documents.Count 속성

Documents 컬렉션의 개체 수를 나타내는 값을 가져옵니다.

네임스페이스:  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
Documents 컬렉션의 개체 수를 나타내는 정수 값입니다.

예제

public void Example(DTE2 dte)
{
   try
   {
      // Run this code after opening up a project with at least one document.
      Documents docs;

      // Return the documents collection in the current application instance.
      docs = dte.Documents;

      // Show the number of open documents in the current application.
      MessageBox.Show(docs.Count.ToString());

      // Show the parent object of the current docs collection.
      MessageBox.Show(docs.Parent.FullName);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}

.NET Framework 보안

참고 항목

참조

Documents 인터페이스

EnvDTE 네임스페이스

기타 리소스

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