DataUsage DataUsage DataUsage DataUsage Class

Note

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

Represents data usage information returned by the GetLocalUsage(Windows.Foundation.DateTime,Windows.Foundation.DateTime) method.

Syntax

Declaration

public sealed class DataUsagepublic sealed class DataUsagePublic NotInheritable Class DataUsage

Remarks

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

Properties summary

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.

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.

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

    Property 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

    Property Value

    • ulong
      ulong
      ulong
      ulong

      The number of bytes sent.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.DeprecatedAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute

Details

Assembly

Windows.Networking.Connectivity.dll