IPAddress.Loopback Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the IP loopback address. This field is read-only.
public: static initonly System::Net::IPAddress ^ Loopback;
public static readonly System.Net.IPAddress Loopback;
staticval mutable Loopback : System.Net.IPAddress
Public Shared ReadOnly Loopback As IPAddress
Field Value
Examples
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 );
}
public void PrintLoopbackAddress()
{
// Gets the IP loopback address and converts it to a string.
String IpAddressString = IPAddress.Loopback.ToString();
Console.WriteLine("Loopback IP address : " + IpAddressString);
}
Public Sub PrintLoopbackAddress()
' Gets the IP loopback address and converts it to a string.
Dim IpAddressString As [String] = IPAddress.Loopback.ToString()
Console.WriteLine(("Loopback IP address : " + IpAddressString))
End Sub
Remarks
The Loopback field is equivalent to 127.0.0.1 in dotted-quad notation.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา