Anybody know this ?
-
I want to display some values like Windows Task Manager - Performance: Commit Charge (K) -- Peak Physical Memory (K) -- Total, System Cache How can I get this values using PerformanceCounter ? Thanks.
That would be quite a trick. You would have to descend from PerformanceCounter to build a composite class that got that information for you from the class(es) you should be getting that information from directly. That would sort of be the long way around the problem kinda sorta wouldn't it? Search your documentation and find the class(es) that do what you need to do. Call their methods or read their properties, and you won't have to design a class that uses that class to find out you can use that class directly. BTW, here is what your documentation says about PerformanceCounter (I checked, just not to embarrass myself to horribly): http://msdn2.microsoft.com/en-us/system.diagnostics.performancecounter(VS.71).aspx If you don't find an appropriate member, your class search has just begun.
-
That would be quite a trick. You would have to descend from PerformanceCounter to build a composite class that got that information for you from the class(es) you should be getting that information from directly. That would sort of be the long way around the problem kinda sorta wouldn't it? Search your documentation and find the class(es) that do what you need to do. Call their methods or read their properties, and you won't have to design a class that uses that class to find out you can use that class directly. BTW, here is what your documentation says about PerformanceCounter (I checked, just not to embarrass myself to horribly): http://msdn2.microsoft.com/en-us/system.diagnostics.performancecounter(VS.71).aspx If you don't find an appropriate member, your class search has just begun.