This topic has not yet been rated - Rate this topic

PerformanceCounterCategoryType Enumeration

Indicates whether the performance counter category can have multiple instances.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)
public enum PerformanceCounterCategoryType
Member name Description
Unknown The instance functionality for the performance counter category is unknown.
SingleInstance The performance counter category can have only a single instance.
MultiInstance The performance counter category can have multiple instances.

There are two types of performance counter categories: single-instance and multi-instance. By default, a category is single-instance when it is created and becomes multi-instance when another instance is added. Categories are created when an application is set up, and instances are added at run time. In the .NET Framework version 1.0 and version 1.1, it is not necessary to know whether a performance counter category is multi-instance or single-instance. In the .NET Framework version 2.0, the PerformanceCounterCategoryType enumeration is used to indicate whether a performance counter can have multiple instances.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Difference between Single Instance and Multi Instance
This is a great example of a help topic which simply regurgitates the names of the values - "multi-instance means it can have multiple instances."  Duh!  I got that part.  What I didn't get is what the difference is between a multi-instance and single-instance counter.  Fortunately, others on the web have documented this - see for instance http://blogs.msdn.com/b/bclteam/archive/2004/10/29/249799.aspx which describes the reason for this addition in .NET 2.0.

So here's the two-cent explanation (read the blog post for more details).  A single-instance counter has one machine-wide value; a multi-instance counter has multiple values on a single machine.  Anything per-process, per-thread, etc. is multi-instance (since there are multiple of these running on a single machine).  Things like Memory (which is per-machine) is single instance.