CounterSampleCalculator.ComputeCounterValue Method (CounterSample)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Computes the calculated value of a single raw counter sample.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

public static float ComputeCounterValue(
	CounterSample newSample
)

Parameters

newSample
Type: System.Diagnostics.CounterSample

A CounterSample that indicates the most recent sample the system has taken.

Return Value

Type: System.Single

A floating-point representation of the performance counter's calculated value.

The ComputeCounterValue(CounterSample) method overload returns meaningful results only for performance counters of the following PerformanceCounterType:

For other counter types, this overload always returns a value of 0 (zero).

.NET Framework
Available since 1.1
Return to top
Show: