| .NET DotNet Forum Index » Visual C# Forum » How to count number of core in PC?... |
|
Page 1 of 1 |
|
| Author |
Message |
| Kim S... |
Posted: Mon Nov 02, 2009 7:36 pm |
|
|
|
Guest
|
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 S. |
|
|
| Back to top |
|
|
|
| Peter Duniho... |
Posted: Mon Nov 02, 2009 7:47 pm |
|
|
|
Guest
|
Kim S wrote:
Quote: I have some code that only can run on multi core processor
That doesn't sound correct. You may want to rethink that assertion.
Quote: 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 |
|
|
| Back to top |
|
|
|
| Donald... |
Posted: Mon Nov 02, 2009 8:37 pm |
|
|
|
Guest
|
System.Environment.ProcessorCount
"Kim S" wrote:
Quote: 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 S. |
|
|
| Back to top |
|
|
|
|