SingleInstanceEventArgs Class

Provides data for the SingleInstance.NewInstance event when another instance of the application attempts to start.

public sealed class SingleInstanceEventArgs : EventArgs
Inheritance
EventArgs SingleInstanceEventArgs

Constructors

NameDescription
SingleInstanceEventArgs(int, string[])Initializes a new instance of the SingleInstanceEventArgs class with the specified process ID and arguments.

SingleInstanceEventArgs(int, string[])

SingleInstanceEventArgs.cs

Initializes a new instance of the SingleInstanceEventArgs class with the specified process ID and arguments.

public SingleInstanceEventArgs(int processId, string[] arguments)

Parameters

processId int
The process ID of the new instance that is attempting to start.
arguments string[]
The command-line arguments passed to the new instance.

Properties

NameDescription
ArgumentsGets the command-line arguments passed to the new instance.
ProcessIdGets the process ID of the new instance that is attempting to start.

Gets the command-line arguments passed to the new instance.

public string[] Arguments { get; }

Property value

string[]

Gets the process ID of the new instance that is attempting to start.

public int ProcessId { get; }

Property value

int