NoNullAllowedException 构造函数

定义

初始化 NoNullAllowedException 类的新实例。

重载

NoNullAllowedException()

初始化 NoNullAllowedException 类的新实例。

NoNullAllowedException(String)

使用指定的字符串初始化 NoNullAllowedException 类的新实例。

NoNullAllowedException(SerializationInfo, StreamingContext)
已过时.

使用序列化信息初始化 NoNullAllowedException 类的新实例。

NoNullAllowedException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 NoNullAllowedException 类的新实例。

NoNullAllowedException()

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

初始化 NoNullAllowedException 类的新实例。

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

适用于

NoNullAllowedException(String)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

使用指定的字符串初始化 NoNullAllowedException 类的新实例。

public:
 NoNullAllowedException(System::String ^ s);
public NoNullAllowedException (string? s);
public NoNullAllowedException (string s);
new System.Data.NoNullAllowedException : string -> System.Data.NoNullAllowedException
Public Sub New (s As String)

参数

s
String

引发异常时显示的字符串。

适用于

NoNullAllowedException(SerializationInfo, StreamingContext)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

注意

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

使用序列化信息初始化 NoNullAllowedException 类的新实例。

protected:
 NoNullAllowedException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected NoNullAllowedException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[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 NoNullAllowedException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.NoNullAllowedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.NoNullAllowedException
[<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.Data.NoNullAllowedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.NoNullAllowedException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

序列化或反序列化对象时所需的数据。

context
StreamingContext

指定的序列化流的源和目标的说明。

属性

另请参阅

适用于

NoNullAllowedException(String, Exception)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 NoNullAllowedException 类的新实例。

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

参数

message
String

解释异常原因的错误消息。

innerException
Exception

导致当前异常的异常;如果未指定内部异常,则是一个 null 引用(在 Visual Basic 中为 Nothing)。

适用于