How to get the number of processors available to the current process (computer) in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        Console.WriteLine("The number of processors on this computer is {0}", Environment.ProcessorCount);
    }
}




/*
run:

The number of processors on this computer is 8

*/

 



answered Nov 18, 2023 by avibootz

Related questions

...