Detecting the number of processors

后端 未结 8 1584
耶瑟儿~
耶瑟儿~ 2020-11-30 10:50

How do you detect the number of physical processors/cores in .net?

相关标签:
8条回答
  • 2020-11-30 11:43

    Environment.ProcessorCount

    EDIT: available in .NET 2.0, not in .NET 1.1

    0 讨论(0)
  • 2020-11-30 11:43

    Don't have enough rep for the wiki, but note that in addition to XPSP2, Windows 2003 Server SP1 and SP2 also need a hotfix to enable this functionality:

    http://support.microsoft.com/kb/932370

    0 讨论(0)
提交回复
热议问题