Share via


EventLogReader.ReadEvent 方法

定义

读取从此对象中的事件查询返回的下一个事件。

重载

ReadEvent()

读取从此对象中的事件查询返回的下一个事件。

ReadEvent(TimeSpan)

读取从此对象中的事件查询返回的下一个事件。

ReadEvent()

Source:
EventLogReader.cs
Source:
EventLogReader.cs
Source:
EventLogReader.cs

读取从此对象中的事件查询返回的下一个事件。

public:
 System::Diagnostics::Eventing::Reader::EventRecord ^ ReadEvent();
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent ();
member this.ReadEvent : unit -> System.Diagnostics.Eventing.Reader.EventRecord
Public Function ReadEvent () As EventRecord

返回

返回一个 EventRecord 对象。

示例

有关使用此类的示例代码,请参阅 如何:查询事件

另请参阅

适用于

ReadEvent(TimeSpan)

Source:
EventLogReader.cs
Source:
EventLogReader.cs
Source:
EventLogReader.cs

读取从此对象中的事件查询返回的下一个事件。

public:
 System::Diagnostics::Eventing::Reader::EventRecord ^ ReadEvent(TimeSpan timeout);
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent (TimeSpan timeout);
[System.Security.SecurityCritical]
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent (TimeSpan timeout);
member this.ReadEvent : TimeSpan -> System.Diagnostics.Eventing.Reader.EventRecord
[<System.Security.SecurityCritical>]
member this.ReadEvent : TimeSpan -> System.Diagnostics.Eventing.Reader.EventRecord
Public Function ReadEvent (timeout As TimeSpan) As EventRecord

参数

timeout
TimeSpan

取消读取操作前允许该操作运行的最大时间。

返回

返回一个 EventRecord 对象。

属性

另请参阅

适用于