- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# program to get the total number of cores on a computer
Use the Environment.ProcessorCount to get the total number of cores on a computer −
Environment.ProcessorCount
The following is the code that displays the total number of cores on a computer in C# −
Example
Using System; namespace Demo { class Program { static void Main(string[] args) { Console.WriteLine(Environment.ProcessorCount); } } }
Advertisements