<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.7.20364.11" />

EventLogException

public class EventLogException : Exception
Represents the base class for all the exceptions that are thrown when an error occurs while reading event log related information.

Initializes a new instance of the EventLogException class.

protected EventLogException(int errorCode)

Initializes a new instance of the EventLogException class with the error code for the exception.

protected EventLogException(SerializationInfo serializationInfo, StreamingContext streamingContext)

Initializes a new instance of the EventLogException class with serialized data.

public EventLogException(string message)

Initializes a new instance of the EventLogException class by specifying the error message that describes the current exception.

public EventLogException(string message, Exception innerException)

Initializes a new instance of the EventLogException class with an error message and inner exception.