SqlNullValueException 构造函数

定义

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

重载

SqlNullValueException()

使用说明错误的系统提供的消息初始化 SqlNullValueException 类的新实例。Initializes a new instance of the SqlNullValueException class with a system-supplied message that describes the error.

SqlNullValueException(String)

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

SqlNullValueException(String, Exception)

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

SqlNullValueException()

使用说明错误的系统提供的消息初始化 SqlNullValueException 类的新实例。Initializes a new instance of the SqlNullValueException class with a system-supplied message that describes the error.

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

注解

此构造函数将 Message 新实例的属性初始化为系统提供的描述错误的消息,如 "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply"。此消息将考虑当前系统区域性。This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply" This message takes into account the current system culture.

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

propertiesProperty Value
InnerException null.null.
Message 本地化的错误消息字符串。The localized error message string.

适用于

SqlNullValueException(String)

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

public:
 SqlNullValueException(System::String ^ message);
public SqlNullValueException (string message);
public SqlNullValueException (string? message);
new System.Data.SqlTypes.SqlNullValueException : string -> System.Data.SqlTypes.SqlNullValueException
Public Sub New (message As String)

参数

message
String

描述该异常的消息。The message that describes the exception. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

注解

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

propertiesProperty Value
InnerException null.null.
Message message 中指定的错误消息字符串。The error message string specified in message.

适用于

SqlNullValueException(String, Exception)

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

public:
 SqlNullValueException(System::String ^ message, Exception ^ e);
public SqlNullValueException (string message, Exception e);
public SqlNullValueException (string? message, Exception? e);
new System.Data.SqlTypes.SqlNullValueException : string * Exception -> System.Data.SqlTypes.SqlNullValueException
Public Sub New (message As String, e As Exception)

参数

message
String

描述该异常的消息。The message that describes the exception. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

e
Exception

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

适用于