IPAddress.IsLoopback Method (IPAddress)


Indicates whether the specified IP address is the loopback address.

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

static member IsLoopback : 
        address:IPAddress -> bool


Type: System.Net.IPAddress

An IP address.

Return Value

Type: System.Boolean

true if address is the loopback address; otherwise, false.

The IsLoopback method compares address to Loopback and returns true if the two IP 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 (

The following code example uses the IsLoopback method to determine whether the specified address is a loopback address.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top