Documents.Count Özellik

Tanım

Koleksiyondaki nesne sayısını gösteren bir değer alır Documents .

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

Özellik Değeri

Int32

Koleksiyondaki nesne sayısını gösteren bir tamsayı değeri Documents .

Öznitelikler

Örnekler

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

Şunlara uygulanır