CounterSampleCalculator.ComputeCounterValue Method (CounterSample)


Computes the calculated value of a single raw counter sample.

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

static member ComputeCounterValue : 
        newSample:CounterSample -> float32


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