System.Diagnostics.InstanceDataCollectionCollection.Contains Method

Determines whether an instance data collection for the specified counter (identified by one of the indexed System.Diagnostics.InstanceDataCollection objects) exists in the collection.

Syntax

public bool Contains (string counterName)

Parameters

counterName
The name of the performance counter.

Returns

true if an instance data collection containing the specified counter exists in the collection; otherwise, false.

Remarks

The counterName parameter is case-insensitive.

Each System.Diagnostics.InstanceDataCollection object in the collection contains the performance data for all counters for an instance. The data is indexed by counter name and then by instance name. InstanceDataCollectionCollection.Contains(string) returns true if there is an System.Diagnostics.InstanceDataCollection object whose associated counter has the name specified by the counterName parameter.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0