DataUsage DataUsage DataUsage DataUsage Class

Definition

Note

DataUsage may be altered or unavailable for releases after Windows 8.1. Instead, use NetworkUsage

Represents data usage information returned by the ConnectionProfile.GetLocalUsage method.

public : sealed class DataUsage : IDataUsage
public sealed class DataUsage : IDataUsage
Public NotInheritable Class DataUsage Implements IDataUsage
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For more information on using cost data to manage connectivity, see Quickstart: Managing metered network cost constraints.

Properties

BytesReceived BytesReceived BytesReceived BytesReceived

Note

DataUsage may be altered or unavailable for releases after Windows 8.1. Instead, use NetworkUsage

Gets a value indicating the number of bytes received by a connection over a specific period of time.

public : ulong BytesReceived { get; }
public ulong BytesReceived { get; }
Public ReadOnly Property BytesReceived As ulong
var ulong = dataUsage.bytesReceived;
Value
ulong ulong ulong ulong

The number of bytes received.

BytesSent BytesSent BytesSent BytesSent

Note

DataUsage may be altered or unavailable for releases after Windows 8.1. Instead, use NetworkUsage

Gets a value indicating the number of bytes sent by the connection over a specific period of time.

public : ulong BytesSent { get; }
public ulong BytesSent { get; }
Public ReadOnly Property BytesSent As ulong
var ulong = dataUsage.bytesSent;
Value
ulong ulong ulong ulong

The number of bytes sent.

See Also