January 2008
Beginner
352 pages
9h 6m
English
Although we have created the category and we have created the code to create the counters, we haven’t yet created any code that will implement and use the counters in our code. If we don’t do this, the counters will be useless to anyone who wants to view them. Let’s review how to implement counters and expose their values to the consumers.
We need to create an instance of each counter in the service so that we can modify the values of those counters as the service runs. To create instances of the counters, we use the PerformanceCounter class. Before we can create a usable instance of a counter, we have to know the counter name and the instance we wish to read or write to. In the case ...
Read now
Unlock full access