Documents.Count Özellik
Nesnelerin sayısını belirten bir değeri alır Documents koleksiyonu.
Ad alanı: EnvDTE
Derleme: EnvDTE (EnvDTE.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
int get ();
}
abstract Count : int
function get Count () : int
Özellik Değeri
Tür: System.Int32
Nesnelerin sayısını belirten bir tamsayı değeri Documents koleksiyonu.
Ö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);
}
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.
Ayrıca bkz.
Başvuru
Diğer Kaynaklar
Nasıl yapılır: derlemek ve Otomasyon nesne modeli kod örneklerini çalıştırmak