ActionNotSupportedException Konstruktorer

Definition

Initierar en ny instans av ActionNotSupportedException klassen.

Överlagringar

Name Description
ActionNotSupportedException()

Initierar en ny instans av ActionNotSupportedException klassen.

ActionNotSupportedException(String)

Initierar en ny instans av ActionNotSupportedException klassen med ett angivet felmeddelande.

ActionNotSupportedException(SerializationInfo, StreamingContext)

Initierar en ny instans av ActionNotSupportedException klassen med serialiseringsinformation och strömningskontext angiven.

ActionNotSupportedException(String, Exception)

Initierar en ny instans av ActionNotSupportedException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till undantaget.

Kommentarer

Om du vill skicka ett felmeddelande till användaren använder du ActionNotSupportedException(String) konstruktorn.

Om du vill skicka ett felmeddelande och en referens till det inre undantaget som är orsaken till undantaget till användaren använder du ActionNotSupportedException(String, Exception) konstruktorn.

Om du vill skicka serialiseringsinformation och direktuppspelningskontext använder du ActionNotSupportedException(SerializationInfo, StreamingContext) konstruktorn.

ActionNotSupportedException()

Initierar en ny instans av ActionNotSupportedException klassen.

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

Gäller för

ActionNotSupportedException(String)

Initierar en ny instans av ActionNotSupportedException klassen med ett angivet felmeddelande.

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

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

Kommentarer

Använd den här konstruktorn när du vill skicka ett felmeddelande till användaren. Innehållet i meddelandeparametern bör vara begripligt för de avsedda användarna.

Gäller för

ActionNotSupportedException(SerializationInfo, StreamingContext)

Initierar en ny instans av ActionNotSupportedException klassen med serialiseringsinformation och strömningskontext angiven.

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)

Parametrar

info
SerializationInfo

Som SerializationInfo innehåller alla data som krävs för att serialisera undantaget.

context
StreamingContext

Det StreamingContext som anger källan och målet för strömmen.

Kommentarer

Den här konstruktorn anropas under deserialiseringen för att rekonstruera undantagsobjektet som överförs via en ström.

Gäller för

ActionNotSupportedException(String, Exception)

Initierar en ny instans av ActionNotSupportedException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till undantaget.

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)

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

innerException
Exception

Det Exception som gjorde att det aktuella undantaget utlöstes.

Kommentarer

Använd den här konstruktorn när du vill skicka ett felmeddelande och information om ett inre undantag till användaren. Innehållet i meddelandeparametern bör vara begripligt för de avsedda användarna.

Ett undantag som genereras som ett direkt resultat av ett tidigare undantag kan innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn eller en null referens (Nothing i Visual Basic) om egenskapen InnerException inte tillhandahåller konstruktorn det inre undantagsvärdet.

Gäller för