IPAddress.IsLoopback Method

Indicates whether the specified IP address is the loopback address.

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


Public Shared Function IsLoopback ( _
    address As IPAddress _
) As Boolean
public static bool IsLoopback(
    IPAddress address


Return Value

Type: System.Boolean
true if address is the loopback address; otherwise, false.


Exception Condition

The address parameter is nulla null reference (Nothing in Visual Basic).


The IsLoopback method compares address to Loopback when the AddressFamily property is InterNetworkV6 and returns true if the two IPv6 addresses are the same.

In the case of IPv4, that the IsLoopback method returns true for any IP address of the form 127.X.Y.Z (where X, Y, and Z are in the range 0-255), not just Loopback (

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.