InvalidCredentialException 构造函数

定义

初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class.

重载

InvalidCredentialException()

不使用任何消息初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with no message.

InvalidCredentialException(String)

使用指定的消息初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with the specified message.

InvalidCredentialException(SerializationInfo, StreamingContext)

InvalidCredentialExceptionSerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。Initializes a new instance of the InvalidCredentialException class from the specified instances of the SerializationInfo and StreamingContext classes.

InvalidCredentialException(String, Exception)

使用指定的消息和内部异常初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with the specified message and inner exception.

InvalidCredentialException()

不使用任何消息初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with no message.

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

注解

此构造函数不执行任何操作。This constructor does nothing.

适用于

InvalidCredentialException(String)

使用指定的消息初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with the specified message.

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

参数

message
String

描述身份验证失败的 StringA String that describes the authentication failure.

注解

此构造函数 Message 用参数中的文本初始化属性 messageThis constructor initializes the Message property with the text in the message parameter. InnerException 属性设置为 nullThe InnerException property is set to null.

另请参阅

适用于

InvalidCredentialException(SerializationInfo, StreamingContext)

InvalidCredentialExceptionSerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。Initializes a new instance of the InvalidCredentialException class from the specified instances of the SerializationInfo and StreamingContext classes.

protected:
 InvalidCredentialException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected InvalidCredentialException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Security.Authentication.InvalidCredentialException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Authentication.InvalidCredentialException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

参数

serializationInfo
SerializationInfo

SerializationInfo 实例,包含反序列化新的 InvalidCredentialException 实例所需的信息。A SerializationInfo instance that contains the information required to deserialize the new InvalidCredentialException instance.

streamingContext
StreamingContext

一个 StreamingContext 实例。A StreamingContext instance.

另请参阅

适用于

InvalidCredentialException(String, Exception)

使用指定的消息和内部异常初始化 InvalidCredentialException 类的新实例。Initializes a new instance of the InvalidCredentialException class with the specified message and inner exception.

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

参数

message
String

描述身份验证失败的 StringA String that describes the authentication failure.

innerException
Exception

导致当前异常的 ExceptionThe Exception that is the cause of the current exception.

注解

此构造函数 Message 用参数中的文本初始化属性 message ,并 InnerException 用参数值初始化属性 innerExceptionThis constructor initializes the Message property with the text in the message parameter and initializes the InnerException property with the innerException parameter value.

另请参阅

适用于