DuplicateNameException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DuplicateNameException 类的新实例。
重载
DuplicateNameException() |
初始化 DuplicateNameException 类的新实例。 |
DuplicateNameException(String) |
使用指定的字符串初始化 DuplicateNameException 类的新实例。 |
DuplicateNameException(SerializationInfo, StreamingContext) |
已过时.
使用序列化信息初始化 DuplicateNameException 类的新实例。 |
DuplicateNameException(String, Exception) |
使用指定的字符串和异常初始化 DuplicateNameException 类的新实例。 |
DuplicateNameException()
- Source:
- DataException.cs
- Source:
- DataException.cs
- Source:
- DataException.cs
初始化 DuplicateNameException 类的新实例。
public:
DuplicateNameException();
public DuplicateNameException ();
Public Sub New ()
适用于
DuplicateNameException(String)
- Source:
- DataException.cs
- Source:
- DataException.cs
- Source:
- DataException.cs
使用指定的字符串初始化 DuplicateNameException 类的新实例。
public:
DuplicateNameException(System::String ^ s);
public DuplicateNameException (string? s);
public DuplicateNameException (string s);
new System.Data.DuplicateNameException : string -> System.Data.DuplicateNameException
Public Sub New (s As String)
参数
- s
- String
引发异常时显示的字符串。
适用于
DuplicateNameException(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.
使用序列化信息初始化 DuplicateNameException 类的新实例。
protected:
DuplicateNameException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected DuplicateNameException (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 DuplicateNameException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.DuplicateNameException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.DuplicateNameException
[<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.DuplicateNameException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.DuplicateNameException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
参数
- info
- SerializationInfo
序列化或反序列化对象时所需的数据。
- context
- StreamingContext
指定的序列化流的源和目标的说明。
- 属性
另请参阅
适用于
DuplicateNameException(String, Exception)
- Source:
- DataException.cs
- Source:
- DataException.cs
- Source:
- DataException.cs
使用指定的字符串和异常初始化 DuplicateNameException 类的新实例。
public:
DuplicateNameException(System::String ^ message, Exception ^ innerException);
public DuplicateNameException (string? message, Exception? innerException);
public DuplicateNameException (string message, Exception innerException);
new System.Data.DuplicateNameException : string * Exception -> System.Data.DuplicateNameException
Public Sub New (message As String, innerException As Exception)
参数
- message
- String
解释异常原因的错误消息。
- innerException
- Exception
导致当前异常的异常;如果未指定内部异常,则是一个 null 引用(在 Visual Basic 中为 Nothing
)。