Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPAddress::Loopback Field

 

Provides the IP loopback address. This field is read-only.

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

public:
static initonly IPAddress^ Loopback

Field Value

Type: System.Net::IPAddress^

The Loopback field is equivalent to 127.0.0.1 in dotted-quad notation.

The following example prints the Loopback address to the console.

void PrintLoopbackAddress()
{
   // Gets the IP loopback address and converts it to a string.
   String^ IpAddressString = IPAddress::Loopback->ToString();
   Console::WriteLine( "Loopback IP address : {0}", IpAddressString );
}

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2017 Microsoft