Windows Dev Center

ConnectionCost class

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

Syntax


var connectionCost = getConnectionCost();

Members

The ConnectionCost class has these types of members:

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.

BackgroundDataUsageRestricted

Read-onlyGets a value that indicates whether background data usage has been restricted.

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 (Windows 10 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 (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

Attributes

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

See also

Object
Quickstart: Managing metered network cost constraints

 

 

Show:
© 2015 Microsoft