IsLoopback Property

Uri.IsLoopback Property

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

Gets whether the specified Uri references the local host.

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

public bool IsLoopback { get; }

Property Value

Type: System.Boolean
A Boolean value that is true if this Uri references the local host; otherwise, false.

ExceptionCondition
InvalidOperationException

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

IsLoopback returns true if the URI specified when this instance was created was 127.0.0.1, loopback, or localhost, or if the URI did not specify host information (for example, file:///c:Dir/file.txt). All other URIs return false.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft