Languages
[Edit]
EN

C#/.NET - get number of processors on the current machine

9 points
Created by:
Root-ssh
68500

In C#/.NET it is possible to get number of processors on the current machine with Environment.ProcessorCount property. 

Environment.ProcessorCount property example

int count = Environment.ProcessorCount;

Console.WriteLine("Number of available processors is " + count + ".");

Output:

Number of available processors is 4.

References:

  1. Environment.ProcessorCount Property - Microsoft Docs
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join