ParallelHelperCoreCount Property

Gets the number of processor cores available for the current process.

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static int CoreCount { get; }

Property Value

Int32

Remarks

Then targeting .NET 6.0 or later this property returns the same value as the Environment.ProcessorCount property. On earlier .NET versions the Environment.ProcessorCount property may return an incorrect value on Windows, because it does not respect the configured processor affinity of the current process.

See Also