Represents a query for events in an event log and the settings that define how the query is executed and on what computer the query is executed on.
Assembly: System.Core (in System.Core.dll)
Initializes a new instance of theclass by specifying the target of the query. The target can be an active event log or a log file.
|EventLogQuery(String, PathType, String)|
Initializes a new instance of theclass by specifying the target of the query and the event query. The target can be an active event log or a log file.
Gets or sets the Boolean value that determines whether to read events from the newest event in an event log to the oldest event in the log.
Gets or sets a Boolean value that determines whether this query will continue to retrieve events when the query has an error.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
For example code using this class, see How To: Query for Events or How To: Access and Read Event Information.
Available since 3.5
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Technology Summary for Reading and Managing Event Logs
Event Log Scenarios