CantStartSingleInstanceException Costruttori
Definizione
Inizializza una nuova istanza della classe CantStartSingleInstanceException.Initializes a new instance of the CantStartSingleInstanceException class.
Overload
CantStartSingleInstanceException() |
Inizializza una nuova istanza della classe CantStartSingleInstanceException.Initializes a new instance of the CantStartSingleInstanceException class. |
CantStartSingleInstanceException(String) |
Inizializza una nuova istanza della classe CantStartSingleInstanceException con un messaggio di errore specificato.Initializes a new instance of the CantStartSingleInstanceException class with a specified error message. |
CantStartSingleInstanceException(SerializationInfo, StreamingContext) |
Inizializza una nuova istanza della classe CantStartSingleInstanceException con dati serializzati.Initializes a new instance of the CantStartSingleInstanceException class with serialized data. |
CantStartSingleInstanceException(String, Exception) |
Inizializza una nuova istanza della classe CantStartSingleInstanceException con un messaggio di errore specificato e un riferimento all'eccezione interna che è la causa dell'eccezione corrente.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()
Inizializza una nuova istanza della classe CantStartSingleInstanceException.Initializes a new instance of the CantStartSingleInstanceException class.
public:
CantStartSingleInstanceException();
public CantStartSingleInstanceException ();
Public Sub New ()
Commenti
Un'applicazione a istanza singola è diversa da un'applicazione normale, in quanto è possibile eseguire una sola istanza dell'applicazione alla volta.A single-instance application differs from a normal application in that only one instance of the application can be running at a time. Quando viene avviata, un'istanza dell'applicazione successiva tenta di contattare la prima applicazione dell'istanza per passare i relativi argomenti della riga di comando.When a subsequent application instance starts, it attempts to contact the first instance application to pass its command-line arguments. Se non è possibile contattare la prima istanza, l'oggetto CantStartSingleInstanceException viene generato nell'istanza dell'applicazione successiva.If the first instance cannot be contacted, the CantStartSingleInstanceException is raised in the subsequent application instance. Per ulteriori informazioni, vedere Panoramica del modello di applicazione Visual Basic.For more information, see Overview of the Visual Basic Application Model.
Nella tabella seguente vengono illustrati i valori di proprietà iniziali per un'istanza di CantStartSingleInstanceException.The following table shows the initial property values for an instance of CantStartSingleInstanceException.
ProprietàProperty | valoreValue |
---|---|
InnerException | Riferimento null (Nothing in Visual Basic).A null reference (Nothing in Visual Basic). |
Message | Stringa del messaggio di errore localizzato.The localized error message string. |
Vedi anche
- StartupNextInstance
- Cenni preliminari sul modello di applicazione Visual BasicOverview of the Visual Basic Application Model
Si applica a
CantStartSingleInstanceException(String)
Inizializza una nuova istanza della classe CantStartSingleInstanceException con un messaggio di errore specificato.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)
Parametri
- message
- String
Messaggio in cui viene descritto l'errore,A message that describes the error.
Commenti
Il contenuto del parametro message
deve essere facilmente comprensibile.The content of the message
parameter is intended to be understood by humans. Il chiamante di questo costruttore è necessario per assicurarsi che questa stringa sia stata localizzata per le impostazioni cultura correnti del sistema.The caller of this constructor is required to ensure that this string has been localized for the current system culture.
CantStartSingleInstanceException eredita da Exception.CantStartSingleInstanceException inherits from Exception. Questo costruttore imposta le proprietà dell' Exception oggetto come illustrato nella tabella seguente.This constructor sets the properties of the Exception object as shown in the following table.
ProprietàProperty | valoreValue |
---|---|
InnerException | Riferimento null (Nothing in Visual Basic)A null reference (Nothing in Visual Basic) |
Message | message Stringa.The message string. |
Vedi anche
- StartupNextInstance
- Cenni preliminari sul modello di applicazione Visual BasicOverview of the Visual Basic Application Model
Si applica a
CantStartSingleInstanceException(SerializationInfo, StreamingContext)
Inizializza una nuova istanza della classe CantStartSingleInstanceException con dati serializzati.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);
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)
Parametri
- info
- SerializationInfo
Oggetto SerializationInfo contenente i dati dell'oggetto serializzato sull'eccezione generata.The SerializationInfo object that holds the serialized object data about the exception being thrown.
- context
- StreamingContext
Oggetto StreamingContext che contiene le informazioni contestuali sull'origine o sulla destinazione.The StreamingContext object that contains contextual information about the source or destination.
Commenti
Questo costruttore viene chiamato durante la deserializzazione per ricostituire l'oggetto dell'eccezione trasmesso tramite un flusso.This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.
Vedi anche
- StartupNextInstance
- Cenni preliminari sul modello di applicazione Visual BasicOverview of the Visual Basic Application Model
Si applica a
CantStartSingleInstanceException(String, Exception)
Inizializza una nuova istanza della classe CantStartSingleInstanceException con un messaggio di errore specificato e un riferimento all'eccezione interna che è la causa dell'eccezione corrente.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)
Parametri
- inner
- Exception
Oggetto Exception che rappresenta la causa dell'eccezione corrente.The Exception object that is the cause of the current exception. Se il parametro InnerException non è un riferimento null (Nothing
in Visual Basic), l'eccezione corrente viene generata in un blocco Catch
che gestisce l'eccezione interna.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.
Commenti
Il contenuto del parametro message
deve essere facilmente comprensibile.The content of the message
parameter is intended to be understood by humans. Il chiamante di questo costruttore è necessario per assicurarsi che questa stringa sia stata localizzata per le impostazioni cultura correnti del sistema.The caller of this constructor is required to ensure that this string has been localized for the current system culture.
Un'eccezione generata come risultato diretto di un'eccezione precedente deve includere un riferimento all'eccezione precedente nella proprietà InnerException.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. Il InnerException proprietà restituisce lo stesso valore passato nel costruttore o un riferimento null se il InnerException proprietà non fornisce il valore dell'eccezione interna al costruttore.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.
Nella tabella seguente vengono illustrati i valori di proprietà iniziali per un'istanza di ApplicationException.The following table shows the initial property values for an instance of ApplicationException.
ProprietàProperty | valoreValue |
---|---|
InnerException | inner Riferimento.The inner reference. |
Message | message Stringa.The message string. |
Vedi anche
- StartupNextInstance
- Cenni preliminari sul modello di applicazione Visual BasicOverview of the Visual Basic Application Model