Reads all the counter and performance object instance data that is associated with this performance counter category.
[Visual Basic] Public Function ReadCategory() As InstanceDataCollectionCollection [C#] public InstanceDataCollectionCollection ReadCategory(); [C++] public: InstanceDataCollectionCollection* ReadCategory(); [JScript] public function ReadCategory() : InstanceDataCollectionCollection;
An InstanceDataCollectionCollection that contains the counter and performance object instance data for the category.
|InvalidOperationException||The CategoryName property is a null reference (Nothing in Visual Basic). The property might not have been set.|
|Win32Exception||A call to an underlying system API failed.|
You must set the CategoryName property before you call ReadCategory.
Reading the entire category at once can be as efficient as reading a single counter because of the way that the system provides the data.
Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family