NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Creating PerformanceCounter Components

You create an instance of the PerformanceCounter component when you want to build performance monitoring into your application. PerformanceCounter components allow you to connect to existing performance counters, write values to them, and react to values the counters receive.

To create an instance of the PerformanceCounter component programmatically

  1. Create an instance of the PerformanceCounter base class in code. You code might look like this:
    [Visual Basic]
    Dim myPCtr as New System.Diagnostics.PerformanceCounter
Is this the way to do this in the new syntax?
[C#]
System.Diagnostics.PerformanceCounter myPCtr =
   new System.Diagnostics.PerformanceCounter();
  1. Configure any other necessary properties for your component. For details, see Configuring PerformanceCounter Components.

See Also

Configuring PerformanceCounter Components