How can I access the c # performance counter in code?

I want to use the output of a performance counter in my program. How can I access the performance counter in code without using perfmon.exe. I want to create my own application for performance counters.

+6
performance c # counter performancecounter
source share
2 answers

This is displayed through the PerformanceCounter class , samples here .

+10
source share

You can fully interact with PerformanceCounters through the System.Diagnostics.PerformanceCounter classes ( Documentation and examples here ).

+5
source share

All Articles