How can I access the C# performance counter in the code?
问题 I want to use the performance counter output in my program. How can I access the performance counter in code without using the perfmon.exe. I want to create my own performance counter app. 回答1: This is exposed via the PerformanceCounter Class. 回答2: You can fully interact with performancecounters throught the System.Diagnostics.PerformanceCounter classes (Documentation and examples here). 来源: https://stackoverflow.com/questions/2712649/how-can-i-access-the-c-sharp-performance-counter-in-the