Windows Dev Center

ConnectionCost class

Provides access to property values that indicate the current cost of a network connection.

Syntax


var connectionCost = getConnectionCost();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The ConnectionCost class has these types of members:

Methods

The ConnectionCost class inherits methods from the Object class (C#/VB/C++).

Properties

The ConnectionCost class has these properties.

PropertyAccess typeDescription

ApproachingDataLimit

Read-onlyGets a value that indicates if a connection is approaching the data usage allowance specified by the data plan.

NetworkCostType

Read-onlyGets a value that indicates the current network cost for a connection.

OverDataLimit

Read-onlyGets a value that indicates if the connection has exceeded the data usage allowance specified by the data plan.

Roaming

Read-onlyGets a value that indicates whether the connection is connected to a network outside of the home provider.

 

Remarks

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

Note  On Windows Phone 8.1 the Roaming property indicates roaming for international roaming only.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

None supported [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.winmd

See also

Object
Quickstart: Managing metered network cost constraints

 

 

Show:
© 2015 Microsoft