How to count number of core in PC?

  • Thread starter Thread starter Kim S
  • Start date Start date
K

Kim S

I have some code that only can run on multi core processor
How to get the infomation on number og core in the PC in C#
 
Kim said:
I have some code that only can run on multi core processor

That doesn't sound correct. You may want to rethink that assertion.
How to get the infomation on number og core in the PC in C#

See System.Environment.ProcessorCount.

But, per my previous comment: the idea that a particular piece of
software simply can't operate at all if there's only one CPU core
doesn't really make much sense. If in fact there is any
CPU-count-related limitation to your program, there should be a more
direct, results-oriented way to measure that and handle, as opposed to
selecting some arbitrary measure such as CPU cores.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top