CantStartSingleInstanceException Constructors

Definition

Initializes a new instance of the CantStartSingleInstanceException class.

Overloads

CantStartSingleInstanceException()

Initializes a new instance of the CantStartSingleInstanceException class.

CantStartSingleInstanceException(String)

Initializes a new instance of the CantStartSingleInstanceException class with a specified error message.

CantStartSingleInstanceException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the CantStartSingleInstanceException class with serialized data.

CantStartSingleInstanceException(String, Exception)

Initializes a new instance of the CantStartSingleInstanceException class with a specified error message and a reference to the inner exception that is the cause of this exception.

CantStartSingleInstanceException()

Initializes a new instance of the CantStartSingleInstanceException class.

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

Remarks

A single-instance application differs from a normal application in that only one instance of the application can be running at a time. When a subsequent application instance starts, it attempts to contact the first instance application to pass its command-line arguments. If the first instance cannot be contacted, the CantStartSingleInstanceException is raised in the subsequent application instance. For more information, see Overview of the Visual Basic Application Model.

The following table shows the initial property values for an instance of CantStartSingleInstanceException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The localized error message string.

See also

Applies to

CantStartSingleInstanceException(String)

Initializes a new instance of the CantStartSingleInstanceException class with a specified error message.

public:
 CantStartSingleInstanceException(System::String ^ message);
public CantStartSingleInstanceException (string message);
new Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException : string -> Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException
Public Sub New (message As String)

Parameters

message
String

A message that describes the error.

Remarks

The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

CantStartSingleInstanceException inherits from Exception. This constructor sets the properties of the Exception object as shown in the following table.

Property Value
InnerException A null reference (Nothing in Visual Basic)
Message The message string.

See also

Applies to

CantStartSingleInstanceException(SerializationInfo, StreamingContext)

Caution

Type or member is obsolete

Initializes a new instance of the CantStartSingleInstanceException class with serialized data.

protected:
 CantStartSingleInstanceException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected CantStartSingleInstanceException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Type or member is obsolete", DiagnosticId="SYSLIB0051")]
protected CantStartSingleInstanceException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException
[<System.Obsolete("Type or member is obsolete", DiagnosticId="SYSLIB0051")>]
new Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext object that contains contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

See also

Applies to

CantStartSingleInstanceException(String, Exception)

Initializes a new instance of the CantStartSingleInstanceException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 CantStartSingleInstanceException(System::String ^ message, Exception ^ inner);
public CantStartSingleInstanceException (string message, Exception inner);
new Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException : string * Exception -> Microsoft.VisualBasic.ApplicationServices.CantStartSingleInstanceException
Public Sub New (message As String, inner As Exception)

Parameters

message
String

A String object describing the error.

inner
Exception

The Exception object that is the cause of the current exception. If the InnerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a Catch block that handles the inner exception.

Remarks

The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

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. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of ApplicationException.

Property Value
InnerException The inner reference.
Message The message string.

See also

Applies to