Monday, August 9, 2010

Determine Number of Processors

If you want to ask in C# the number of CPU cores in the computer, one command from the class Environment suffices, the property ProcessorCount returns this value:

int NrOfProcessors = Environment.ProcessorCount; 

No comments:

Post a Comment