DuplicateNameException Constructors

Definition

Initializes a new instance of the DuplicateNameException class.

Overloads

DuplicateNameException()

Initializes a new instance of the DuplicateNameException class.

DuplicateNameException(String)

Initializes a new instance of the DuplicateNameException class with the specified string.

DuplicateNameException(SerializationInfo, StreamingContext)

Initializes a new instance of the DuplicateNameException class with serialization information.

DuplicateNameException(String, Exception)

Initializes a new instance of the DuplicateNameException class with the specified string and exception.

DuplicateNameException()

Initializes a new instance of the DuplicateNameException class.

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

DuplicateNameException(String)

Initializes a new instance of the DuplicateNameException class with the specified string.

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

Parameters

s
String

The string to display when the exception is thrown.

DuplicateNameException(SerializationInfo, StreamingContext)

Initializes a new instance of the DuplicateNameException class with serialization information.

protected:
 DuplicateNameException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
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
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The data that is required to serialize or deserialize an object.

context
StreamingContext

Description of the source and destination of the specified serialized stream.

See also

DuplicateNameException(String, Exception)

Initializes a new instance of the DuplicateNameException class with the specified string and exception.

public:
 DuplicateNameException(System::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)

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Applies to