Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [C#] How do i detect how many CPU (cores) are present in a machine?
New Posts  All Forums:Forum Nav:

[C#] How do i detect how many CPU (cores) are present in a machine? - Page 2

post #11 of 16
Thread Starter 
Quote:
Originally Posted by ghell View Post
I know that the question has been answered but always check the System.Environment class when looking for this kind of system information. I have seen long and complicated discussion on marshalling and native interop just to get the system username when it is already there in the Environment class, for example.
Stupid (thats his name, i'm not calling you stupid) already beat you to it.
Lee XT
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-6300 Asus M5A97 SAPPHIRE Radeon HD 7850 AMD 4GB DDR3 1333MHZ 
RAMRAMRAMHard Drive
AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ OCZ Vertex 4 256GB 
CoolingOSMonitorKeyboard
Corsair H80 Windows 8.1 Pro MCE Dell P2414H WHXV7  Microsoft Generic 
PowerCaseMouseMouse Pad
Ultra 600W Limited Edition NZXT Black Steel Razer Deathadder Razer Goliath 
Audio
Realtek HD Audio 
  hide details  
Reply
Lee XT
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-6300 Asus M5A97 SAPPHIRE Radeon HD 7850 AMD 4GB DDR3 1333MHZ 
RAMRAMRAMHard Drive
AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ OCZ Vertex 4 256GB 
CoolingOSMonitorKeyboard
Corsair H80 Windows 8.1 Pro MCE Dell P2414H WHXV7  Microsoft Generic 
PowerCaseMouseMouse Pad
Ultra 600W Limited Edition NZXT Black Steel Razer Deathadder Razer Goliath 
Audio
Realtek HD Audio 
  hide details  
Reply
post #12 of 16
Which is why I said
Quote:
Originally Posted by ghell View Post
I know that the question has been answered but
at the start of my post.

My post was just general advice about looking up similar system attributes as I see questions about things like the username, hostname, processor count, os, os version etc asked frequently and they are all right there in System.Environment so if the OP ever needs to look anything else that is similar up, rather than asking on a forum straight away (as a lot of people tend to reply with poorly marshalled native calls and the like) System.Environment is a good place to look first
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
post #13 of 16
lol #2

I have to sign this OMG>
Gaming PC
(15 items)
 
 
HTC 10
(9 items)
 
CPUMotherboardGraphicsRAM
i5 4690K (Delidded) MSI Z97 MPOWER AC MAX EVGA 980 Ti Hybrid  CMY16GX3M2A2400C11R  
Hard DriveHard DriveHard DriveCooling
A-DATA SP900 2x ST2000DM001-1ER164 ASMedia® ASM1061 (External) Swiftech H320 
OSMonitorMonitorPower
Win 10 x64 1622.rs3 SAMSUNG LS24F350 [MAIN] LG 22MP48HQ [SECONDARY] Corsair RM850w 
CaseMouseAudio
Corsair Obsidian 750D Corsair Harpoon RGB Fiio E7 
CPUCPUMotherboardGraphics
QX9300 @ 2.53Ghz *OLD* Intel Core 2 Duo P8700 Dell 076V94 (Intel Q43) Quadro FX 2700M 
RAMHard DriveHard DriveOptical Drive
2x Samsung M471B5773CHS-CH9 Samsung 840 120GB TOSHIBA MQ01ACF032 HT-DT-ST DVD +-RW GS20N 
CoolingOSMonitorKeyboard
2x Heat-pipe-sink + fans Win 10 x64 15063 Super Lite Edition 1440x900 @ 100hz Dell + Numpad 
PowerMouse Pad
95w Dell Touchpad 
CPUGraphicsRAMHard Drive
Qualcomm Snapdragon 820 MSM8996 [OC] Adreno 530 2x 2GB LPDDR4 32 GB eMMC Flash 
CoolingOSMonitorKeyboard
Passive Android 7.0 2.51.617.1 Super LCD 5: 2560x1440 (565 PPI) Sony Xperia Keyboard 
Power
3,000 mAh Battery 
  hide details  
Reply
Gaming PC
(15 items)
 
 
HTC 10
(9 items)
 
CPUMotherboardGraphicsRAM
i5 4690K (Delidded) MSI Z97 MPOWER AC MAX EVGA 980 Ti Hybrid  CMY16GX3M2A2400C11R  
Hard DriveHard DriveHard DriveCooling
A-DATA SP900 2x ST2000DM001-1ER164 ASMedia® ASM1061 (External) Swiftech H320 
OSMonitorMonitorPower
Win 10 x64 1622.rs3 SAMSUNG LS24F350 [MAIN] LG 22MP48HQ [SECONDARY] Corsair RM850w 
CaseMouseAudio
Corsair Obsidian 750D Corsair Harpoon RGB Fiio E7 
CPUCPUMotherboardGraphics
QX9300 @ 2.53Ghz *OLD* Intel Core 2 Duo P8700 Dell 076V94 (Intel Q43) Quadro FX 2700M 
RAMHard DriveHard DriveOptical Drive
2x Samsung M471B5773CHS-CH9 Samsung 840 120GB TOSHIBA MQ01ACF032 HT-DT-ST DVD +-RW GS20N 
CoolingOSMonitorKeyboard
2x Heat-pipe-sink + fans Win 10 x64 15063 Super Lite Edition 1440x900 @ 100hz Dell + Numpad 
PowerMouse Pad
95w Dell Touchpad 
CPUGraphicsRAMHard Drive
Qualcomm Snapdragon 820 MSM8996 [OC] Adreno 530 2x 2GB LPDDR4 32 GB eMMC Flash 
CoolingOSMonitorKeyboard
Passive Android 7.0 2.51.617.1 Super LCD 5: 2560x1440 (565 PPI) Sony Xperia Keyboard 
Power
3,000 mAh Battery 
  hide details  
Reply
post #14 of 16
C-PUZ or CoreTemp.....search them on Google.
Jacob PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
E4300 Intel D945GCF 8500GT Superclocked (By Me) 3 Gigabytes of G.Skill PC6400 
Hard DriveOSMonitorKeyboard
Western Digital Dual Boot Vista and Ubuntu 7.10 19" Gateway Widescreen LCD Microsoft Digital Media Pro 
PowerCaseMouse
350 Watt =( Apevia X-Jupiter G-Type Cybersnipa 
  hide details  
Reply
Jacob PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
E4300 Intel D945GCF 8500GT Superclocked (By Me) 3 Gigabytes of G.Skill PC6400 
Hard DriveOSMonitorKeyboard
Western Digital Dual Boot Vista and Ubuntu 7.10 19" Gateway Widescreen LCD Microsoft Digital Media Pro 
PowerCaseMouse
350 Watt =( Apevia X-Jupiter G-Type Cybersnipa 
  hide details  
Reply
post #15 of 16
Thread Starter 
Quote:
Originally Posted by KingJacob101 View Post
C-PUZ or CoreTemp.....search them on Google.
Were you making fun of Post#2?
Lee XT
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-6300 Asus M5A97 SAPPHIRE Radeon HD 7850 AMD 4GB DDR3 1333MHZ 
RAMRAMRAMHard Drive
AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ OCZ Vertex 4 256GB 
CoolingOSMonitorKeyboard
Corsair H80 Windows 8.1 Pro MCE Dell P2414H WHXV7  Microsoft Generic 
PowerCaseMouseMouse Pad
Ultra 600W Limited Edition NZXT Black Steel Razer Deathadder Razer Goliath 
Audio
Realtek HD Audio 
  hide details  
Reply
Lee XT
(17 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-6300 Asus M5A97 SAPPHIRE Radeon HD 7850 AMD 4GB DDR3 1333MHZ 
RAMRAMRAMHard Drive
AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ AMD 4GB DDR3 1333MHZ OCZ Vertex 4 256GB 
CoolingOSMonitorKeyboard
Corsair H80 Windows 8.1 Pro MCE Dell P2414H WHXV7  Microsoft Generic 
PowerCaseMouseMouse Pad
Ultra 600W Limited Edition NZXT Black Steel Razer Deathadder Razer Goliath 
Audio
Realtek HD Audio 
  hide details  
Reply
post #16 of 16
Environment.ProcessorCount is what i always used it works pretty well. when i was in school LOL. but the best way i have found is to see what CPU you have.
Lurking Ninja
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 920 D0 3849B203 4.0GHz/1.164 Evga X58 Classified E759/Koolance X58/BIX 120 TRI SLI GTX 285s.** 6GB 3x2 OCZ Gold 1600mhz 
Hard DriveOptical DriveOSMonitor
2x WD3200AAKS (RAID0), 1tb AALS Samsumg Wrigtmaster Sb 204/182 Windows 7 Ultimate X64 Gateway HD2401 24" 
KeyboardPowerCaseMouse
Logitech G15 V1 Corsair HX1000W Modded Rocketfish Logitech MX Revolution 
Mouse Pad
soft cotton? 
  hide details  
Reply
Lurking Ninja
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 920 D0 3849B203 4.0GHz/1.164 Evga X58 Classified E759/Koolance X58/BIX 120 TRI SLI GTX 285s.** 6GB 3x2 OCZ Gold 1600mhz 
Hard DriveOptical DriveOSMonitor
2x WD3200AAKS (RAID0), 1tb AALS Samsumg Wrigtmaster Sb 204/182 Windows 7 Ultimate X64 Gateway HD2401 24" 
KeyboardPowerCaseMouse
Logitech G15 V1 Corsair HX1000W Modded Rocketfish Logitech MX Revolution 
Mouse Pad
soft cotton? 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [C#] How do i detect how many CPU (cores) are present in a machine?