

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Counters in C#
Counters in C# are performance counters that lets you know about your applications performance.
When you will build an application, whether it is a web app, mobile app or even desktop app, you would definitely need to monitor the performance.
For performance counters in C#, use the System.Diagnostics.PerformanceCounter class. Set the instance of the PerformanceCounter class and work with the following properties: CategoryName, CounterName, MachineName and ReadOnly.
To get the performance categories.
var counter = PerformanceCounterCategory.GetCategories();
Now SET performance counters for the category processor.
var counter = PerformanceCounterCategory.GetCategories() .FirstOrDefault(category => category.CategoryName == "Processor");
- Related Questions & Answers
- Counters in Python?
- What are Binary Counters?
- How to create or reset counters with JavaScript?
- How to increment one or more counters with JavaScript?
- Built-in Exceptions in C#
- Built-in Exceptions in Java
- NavigationView in ActionBar in Android
- In-service register in 8259
- JSX in depth in React.js
- deque_max_size( ) in C++ in STL
- deque_resize( ) in C++ in STL
- deque_rbegin( ) in C++ in STL
- deque_rend( ) in C++ in STL
- deque_insert( ) in C++ in STL
- Permutation in String in C++
Advertisements