Environment.ProcessId Property

Definition

Gets the unique identifier for the current process.

public static int ProcessId { get; }

Property Value

A number that represents the unique identifier for the current process.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9