This documentation is archived and is not being maintained.

CounterSample Constructor (Int64, Int64, Int64, Int64, Int64, Int64, PerformanceCounterType)

Initializes a new instance of the CounterSample structure and sets the CounterTimeStamp property to 0 (zero).

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

public CounterSample(
	long rawValue,
	long baseValue,
	long counterFrequency,
	long systemFrequency,
	long timeStamp,
	long timeStamp100nSec,
	PerformanceCounterType counterType


Type: System.Int64
The numeric value associated with the performance counter sample.
Type: System.Int64
An optional, base raw value for the counter, to use only if the sample is based on multiple counters.
Type: System.Int64
The frequency with which the counter is read.
Type: System.Int64
The frequency with which the system reads from the counter.
Type: System.Int64
The raw time stamp.
Type: System.Int64
The raw, high-fidelity time stamp.
Type: System.Diagnostics.PerformanceCounterType
A PerformanceCounterType object that indicates the type of the counter for which this sample is a snapshot.

Use this constructor to take an initial sample of the performance counter. The System Monitor supplies values for these parameters automatically when you call the NextSample method for the first time.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.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.