I think I figured it out on my own
System.Diagnostics.PerformanceCounterCategory mycat = new
System.Diagnostics.PerformanceCounterCategory("Pro cess");
string[] instanceNames;
instanceNames = mycat.GetInstanceNames();
for (int i = 0; i < instanceNames.Length; i++)
{
textBox1.AppendText(instanceNames[i] + "\r\n");
}
"Enzo" wrote:
Quote:
I have a test app where I am using System.Diagnostics.PerformanceCounter.
In the VS.NET 2003 DESIGNER I choose:
CategoryName = 'Process'
CounterName = '% Processor Time'
I want to programmatically display a list to the user of "InstanceName"
values.
Is there anyway to get the "same" list of InstanceNames that are displayed
by the designer?
Thanks |