Create a PerformanceCounterCategory then displays its properties. : PerformanceCounterCategory « Development « C# / CSharp Tutorial






using System;
using System.Diagnostics;
public class MainClass
{
    public static void Main(string[] args)
    {
        PerformanceCounterCategory pcc;

        pcc = new PerformanceCounterCategory();
        //pcc = new PerformanceCounterCategory(categoryName);
        //pcc = new PerformanceCounterCategory(categoryName, machineName);
        // Display the properties of the PerformanceCounterCategory object.
        Console.WriteLine("  Category:  {0}", pcc.CategoryName);
        Console.WriteLine("  Computer:  {0}", pcc.MachineName);
        Console.WriteLine("  Help text: {0}", pcc.CategoryHelp);
    }

}








14.43.PerformanceCounterCategory
14.43.1.Create a PerformanceCounterCategory then displays its properties.