EventLogEntryCollection.Count プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > EventLogEntryCollection.Count プロパティの意味・解説 

EventLogEntryCollection.Count プロパティ

イベント ログのエントリ数 (EventLogEntry コレクション内の要素数) を取得します

名前空間: System.Diagnostics
アセンブリ: System (system.dll 内)
構文構文

解説解説

EventLogEntryCollection は、ログすべてのエントリの動的なリスト表します。したがって作成した EventLogEntryCollection インスタンス有効期間内に、Count変更できます通常、値を変数割り当てるよりも、Count プロパティ直接使用する方が便利です。

使用例使用例
' Create a new EventLog object.
Dim myEventLog1 As New EventLog()
myEventLog1.Log = myLogName
' Obtain the Log Entries of the Event Log
Dim myEventLogEntryCollection As EventLogEntryCollection
 = myEventLog1.Entries
Console.WriteLine("The number of entries in
 'MyNewLog' = " + _
                           myEventLogEntryCollection.Count.ToString())
' Display the 'Message' property of EventLogEntry.
Dim i As Integer
For i = 0 To myEventLogEntryCollection.Count
 - 1
   Console.WriteLine("The Message of the EventLog is :"
 + _
                  myEventLogEntryCollection(i).Message)
Next i
// Create a new EventLog object.
EventLog myEventLog1 = new EventLog();
myEventLog1.Log = myLogName;
// Obtain the Log Entries of the Event Log
EventLogEntryCollection myEventLogEntryCollection=myEventLog1.Entries;
Console.WriteLine("The number of entries in 'MyNewLog' =
 "+
                        myEventLogEntryCollection.Count);
// Display the 'Message' property of EventLogEntry.
for(int i=0;i<myEventLogEntryCollection.Count;i++)
{
   Console.WriteLine("The Message of the EventLog is :"+
                           myEventLogEntryCollection[i].Message);
}
// Create a new EventLog object.
EventLog^ myEventLog1 = gcnew EventLog;
myEventLog1->Log = myLogName;

// Obtain the Log Entries of the Event Log
EventLogEntryCollection^ myEventLogEntryCollection = myEventLog1->Entries;
Console::WriteLine( "The number of entries in 'MyNewLog'
 = {0}", myEventLogEntryCollection->Count );

// Display the 'Message' property of EventLogEntry.
for ( int i = 0; i < myEventLogEntryCollection->Count;
 i++ )
{
   Console::WriteLine( "The Message of the EventLog is : {0}", myEventLogEntryCollection[
 i ]->Message );
}
// Create a new EventLog object.
EventLog myEventLog1 = new EventLog();

myEventLog1.set_Log(myLogName);

// Obtain the Log Entries of the Event Log
EventLogEntryCollection myEventLogEntryCollection = 
    myEventLog1.get_Entries();

Console.WriteLine("The number of entries in 'MyNewLog' =
 " 
    + myEventLogEntryCollection.get_Count());

// Display the 'Message' property of EventLogEntry.
for (int i = 0; i < myEventLogEntryCollection.get_Count();
 i++) {
    Console.WriteLine("The Message of the EventLog is :" 
        + myEventLogEntryCollection.get_Item(i).get_Message());
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
EventLogEntryCollection クラス
EventLogEntryCollection メンバ
System.Diagnostics 名前空間
EventLog.Entries プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からEventLogEntryCollection.Count プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からEventLogEntryCollection.Count プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からEventLogEntryCollection.Count プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「EventLogEntryCollection.Count プロパティ」の関連用語

EventLogEntryCollection.Count プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



EventLogEntryCollection.Count プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS