Process.SessionId Process.SessionId Process.SessionId Process.SessionId Property

Definition

Gets the Terminal Services session identifier for the associated process.

public:
 property int SessionId { int get(); };
[System.MonoNotSupported("")]
public int SessionId { get; }
member this.SessionId : int
Public ReadOnly Property SessionId As Integer

Property Value

The Terminal Services session identifier for the associated process.

Exceptions

There is no process associated with this session identifier.

-or-

The associated process is not on this machine.

Remarks

The SessionId property identifies the session in which the application is currently running.

Security

LinkDemand
for full trust for the immediate caller. This member cannot be used by partially trusted code.

Applies to