IsDefaultPort Property

Uri.IsDefaultPort Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets whether the port value of the URI is the default for this scheme.

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

public bool IsDefaultPort { get; }

Property Value

Type: System.Boolean
A Boolean value that is true if the value in the Port property is the default port for this scheme; otherwise, false.

ExceptionCondition
InvalidOperationException

This instance represents a relative URI, and this property is valid only for absolute URIs.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2016 Microsoft