Επεξεργασία

Κοινή χρήση μέσω


EventLogException Constructors

Definition

Initializes a new instance of the EventLogException class.

Overloads

EventLogException()

Initializes a new instance of the EventLogException class.

EventLogException(Int32)

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

EventLogException(String)

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

EventLogException(SerializationInfo, StreamingContext)
Obsolete.

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

EventLogException(String, Exception)

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

EventLogException()

Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs

Initializes a new instance of the EventLogException class.

public:
 EventLogException();
public EventLogException ();
Public Sub New ()

Applies to

EventLogException(Int32)

Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs

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

protected:
 EventLogException(int errorCode);
protected EventLogException (int errorCode);
new System.Diagnostics.Eventing.Reader.EventLogException : int -> System.Diagnostics.Eventing.Reader.EventLogException
Protected Sub New (errorCode As Integer)

Parameters

errorCode
Int32

The error code for the error that occurred while reading or configuring event log related information.

Applies to

EventLogException(String)

Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs

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

public:
 EventLogException(System::String ^ message);
public EventLogException (string message);
new System.Diagnostics.Eventing.Reader.EventLogException : string -> System.Diagnostics.Eventing.Reader.EventLogException
Public Sub New (message As String)

Parameters

message
String

The error message that describes the current exception.

Applies to

EventLogException(SerializationInfo, StreamingContext)

Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

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

protected:
 EventLogException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected EventLogException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
protected EventLogException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Diagnostics.Eventing.Reader.EventLogException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Diagnostics.Eventing.Reader.EventLogException
new System.Diagnostics.Eventing.Reader.EventLogException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Diagnostics.Eventing.Reader.EventLogException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

Parameters

serializationInfo
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

streamingContext
StreamingContext

The StreamingContext object that contains contextual information about the source or destination.

Attributes

Applies to

EventLogException(String, Exception)

Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs
Source:
EventLogException.cs

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

public:
 EventLogException(System::String ^ message, Exception ^ innerException);
public EventLogException (string message, Exception innerException);
new System.Diagnostics.Eventing.Reader.EventLogException : string * Exception -> System.Diagnostics.Eventing.Reader.EventLogException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The error message that describes the current exception.

innerException
Exception

The Exception instance that caused the current exception.

Applies to