Modifica

Condividi tramite


ActionNotSupportedException Constructors

Definition

Initializes a new instance of the ActionNotSupportedException class.

Overloads

ActionNotSupportedException()

Initializes a new instance of the ActionNotSupportedException class.

ActionNotSupportedException(String)

Initializes a new instance of the ActionNotSupportedException class with a specified error message.

ActionNotSupportedException(SerializationInfo, StreamingContext)

Initializes a new instance of the ActionNotSupportedException class with serialization information and streaming context specified.

ActionNotSupportedException(String, Exception)

Initializes a new instance of the ActionNotSupportedException class with a specified error message and a reference to the inner exception that is the cause of the exception.

Remarks

If you want to pass an error message to the user, use the ActionNotSupportedException(String) constructor.

If you want to pass an error message and a reference to the inner exception that is the cause of the exception to the user, use the ActionNotSupportedException(String, Exception) constructor.

If you want to pass serialization information and streaming context, use the ActionNotSupportedException(SerializationInfo, StreamingContext) constructor.

ActionNotSupportedException()

Source:
ActionNotSupportedException.cs
Source:
ActionNotSupportedException.cs

Initializes a new instance of the ActionNotSupportedException class.

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

Applies to

ActionNotSupportedException(String)

Source:
ActionNotSupportedException.cs
Source:
ActionNotSupportedException.cs

Initializes a new instance of the ActionNotSupportedException class with a specified error message.

public:
 ActionNotSupportedException(System::String ^ message);
public ActionNotSupportedException (string message);
new System.ServiceModel.ActionNotSupportedException : string -> System.ServiceModel.ActionNotSupportedException
Public Sub New (message As String)

Parameters

message
String

The error message that explains the reason for the exception.

Remarks

Use this constructor when you want to pass an error message to the user. The content of the message parameter should be understandable to the intended users.

Applies to

ActionNotSupportedException(SerializationInfo, StreamingContext)

Source:
ActionNotSupportedException.cs
Source:
ActionNotSupportedException.cs

Initializes a new instance of the ActionNotSupportedException class with serialization information and streaming context specified.

protected:
 ActionNotSupportedException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ActionNotSupportedException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceModel.ActionNotSupportedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceModel.ActionNotSupportedException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo that contains all the data required to serialize the exception.

context
StreamingContext

The StreamingContext that specifies the source and destination of the stream.

Remarks

This constructor is called during deserialization to reconstruct the exception object transmitted over a stream.

Applies to

ActionNotSupportedException(String, Exception)

Source:
ActionNotSupportedException.cs
Source:
ActionNotSupportedException.cs

Initializes a new instance of the ActionNotSupportedException class with a specified error message and a reference to the inner exception that is the cause of the exception.

public:
 ActionNotSupportedException(System::String ^ message, Exception ^ innerException);
public ActionNotSupportedException (string message, Exception innerException);
new System.ServiceModel.ActionNotSupportedException : string * Exception -> System.ServiceModel.ActionNotSupportedException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The Exception that caused the current exception to be thrown.

Remarks

Use this constructor when you want to pass an error message and information about an inner exception to the user. The content of the message parameter should be understandable to the intended users.

An exception that is thrown as a direct result of a previous exception can include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor or a null reference (Nothing in Visual Basic) if the InnerException property does not supply the inner exception value to the constructor.

Applies to