NotImplementedException 构造函数

定义

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

重载

NotImplementedException()

使用默认属性初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with default properties.

NotImplementedException(String)

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

NotImplementedException(SerializationInfo, StreamingContext)

使用序列化数据初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with serialized data.

NotImplementedException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

NotImplementedException()

使用默认属性初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with default properties.

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

注解

下表显示 NotImplementedException 的实例的初始属性值。The following table shows the initial property values for an instance of NotImplementedException.

属性Property Value
InnerException nullnull.
Message 空字符串("")。The empty string ("").

NotImplementedException(String)

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

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

参数

message
String

解释异常原因的错误消息。The error message that explains the reason for the exception.

注解

下表显示 NotImplementedException 的实例的初始属性值。The following table shows the initial property values for an instance of NotImplementedException.

属性Property Value
InnerException nullnull.
Message 错误消息字符串。The error message string.

NotImplementedException(SerializationInfo, StreamingContext)

使用序列化数据初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with serialized data.

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

参数

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

StreamingContext,它包含关于源或目标的上下文信息。The StreamingContext that contains contextual information about the source or destination.

NotImplementedException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 NotImplementedException 类的新实例。Initializes a new instance of the NotImplementedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 NotImplementedException(System::String ^ message, Exception ^ inner);
public NotImplementedException (string message, Exception inner);
new NotImplementedException : string * Exception -> NotImplementedException
Public Sub New (message As String, inner As Exception)

参数

message
String

解释异常原因的错误消息。The error message that explains the reason for the exception.

inner
Exception

引起当前异常的异常。The exception that is the cause of the current exception. 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

注解

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. InnerException 属性返回的值与传递到构造函数中的值相同;或者,如果 null 属性没有向构造函数提供内部异常值,则为 InnerExceptionThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示 NotImplementedException 的实例的初始属性值。The following table shows the initial property values for an instance of NotImplementedException.

属性Property Value
InnerException 内部异常引用。The inner exception reference.
Message 错误消息字符串。The error message string.

适用于