IPAddress.Loopback Field

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Shared ReadOnly Loopback As IPAddress
public static readonly IPAddress Loopback

Remarks

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

Examples

The following example prints the IPv4 Loopback address.

' Gets the IP loopback address and converts it to a string.
Dim IpAddressString As [String] = IPAddress.Loopback.ToString()
outputBlock.Text &= "Loopback IP address: "
outputBlock.Text &= IpAddressString
outputBlock.Text &= vbCrLf
   // Gets the IP loopback address and converts it to a string.
   string LoopbackIpAddressString = IPAddress.Loopback.ToString();

   outputBlock.Text += "Loopback IP address: ";
   outputBlock.Text += LoopbackIpAddressString;
   outputBlock.Text += "\n";

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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