AuthenticationException 建構函式

定義

初始化 AuthenticationException 類別的新執行個體。

多載

AuthenticationException()

不使用任何訊息,初始化 AuthenticationException 類別的新執行個體。

AuthenticationException(String)

使用指定的訊息初始化 AuthenticationException 類別的新執行個體。

AuthenticationException(SerializationInfo, StreamingContext)
已淘汰.

初始化 AuthenticationException 類別的新執行個體,這個執行個體是來自 SerializationInfoStreamingContext 類別的指定執行個體。

AuthenticationException(String, Exception)

使用指定的訊息和內部例外狀況初始化 AuthenticationException 類別的新執行個體。

AuthenticationException()

來源:
AuthenticationException.cs
來源:
AuthenticationException.cs
來源:
AuthenticationException.cs

不使用任何訊息,初始化 AuthenticationException 類別的新執行個體。

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

備註

此建構函式不會執行任何動作。

適用於

AuthenticationException(String)

來源:
AuthenticationException.cs
來源:
AuthenticationException.cs
來源:
AuthenticationException.cs

使用指定的訊息初始化 AuthenticationException 類別的新執行個體。

public:
 AuthenticationException(System::String ^ message);
public AuthenticationException (string? message);
public AuthenticationException (string message);
new System.Security.Authentication.AuthenticationException : string -> System.Security.Authentication.AuthenticationException
Public Sub New (message As String)

參數

message
String

描述驗證失敗的 String

備註

這個建構函式會 Message 使用 參數中的 message 文字初始化 屬性。 InnerException 屬性會設定為 null

另請參閱

適用於

AuthenticationException(SerializationInfo, StreamingContext)

來源:
AuthenticationException.cs
來源:
AuthenticationException.cs
來源:
AuthenticationException.cs

警告

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

初始化 AuthenticationException 類別的新執行個體,這個執行個體是來自 SerializationInfoStreamingContext 類別的指定執行個體。

protected:
 AuthenticationException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected AuthenticationException (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 AuthenticationException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Security.Authentication.AuthenticationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Authentication.AuthenticationException
[<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.Security.Authentication.AuthenticationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Authentication.AuthenticationException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

參數

serializationInfo
SerializationInfo

SerializationInfo 執行個體,包含還原序列化新 AuthenticationException 執行個體時所需的資訊。

streamingContext
StreamingContext

StreamingContext 執行個體。

屬性

另請參閱

適用於

AuthenticationException(String, Exception)

來源:
AuthenticationException.cs
來源:
AuthenticationException.cs
來源:
AuthenticationException.cs

使用指定的訊息和內部例外狀況初始化 AuthenticationException 類別的新執行個體。

public:
 AuthenticationException(System::String ^ message, Exception ^ innerException);
public AuthenticationException (string? message, Exception? innerException);
public AuthenticationException (string message, Exception innerException);
new System.Security.Authentication.AuthenticationException : string * Exception -> System.Security.Authentication.AuthenticationException
Public Sub New (message As String, innerException As Exception)

參數

message
String

描述驗證失敗的 String

innerException
Exception

導致目前例外狀況的 Exception

備註

這個建構函式會 Message 使用 參數中的 message 文字初始化 屬性,並使用 參數值初始化 InnerException 屬性 innerException

另請參閱

適用於