IPAddress.IPv6Loopback Veld
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Geeft het IP-loopback-adres op. Deze eigenschap is alleen-lezen.
public: static initonly System::Net::IPAddress ^ IPv6Loopback;
public static readonly System.Net.IPAddress IPv6Loopback;
staticval mutable IPv6Loopback : System.Net.IPAddress
Public Shared ReadOnly IPv6Loopback As IPAddress
Waarde van veld
Voorbeelden
In het volgende codevoorbeeld wordt de waarde van het loopback-adres van de huidige host in standaard gecomprimeerde indeling weergegeven.
// This method displays the value of the current host loopback address in
// standard compressed format.
private static void displayIPv6LoopBackAddress()
{
try
{
// Get the loopback address.
IPAddress loopBack = IPAddress.IPv6Loopback;
// Transform the loop-back address to a string using the overladed
// ToString() method. Note that the resulting string is in the compact
// form: "::1".
string ipv6LoopBack = loopBack.ToString();
Console.WriteLine("The IPv6 Loopback address is: " + ipv6LoopBack);
}
catch (Exception e)
{
Console.WriteLine("[displayIPv6LoopBackAddress] Exception: " + e.ToString());
}
}
' This methods prints the value of the current host loopback address in
' standard compressed format.
Private Shared Sub printIPv6LoopBackAddress()
Try
' Get the loopback address.
Dim loopBack As IPAddress = IPAddress.IPv6Loopback
' Transform the loop-back address to a string using the overloaded
' ToString() method. Note that the resulting string is in the compact
' form: "::1".
Dim ipv6LoopBack As String = loopBack.ToString()
Console.WriteLine(("The IPv6 Loopback address is: " + ipv6LoopBack))
Catch e As Exception
Console.WriteLine(("[printIPv6LoopBackAddress] Exception: " + e.ToString()))
End Try
End Sub
Opmerkingen
Het IPv6Loopback veld is gelijk aan 0:0:0:0:0:0:0:1 in dubbele-hexadecimale notatie of aan ::1 in compacte notatie.