Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Stellt die IP-Loopback-Adresse bereit. Diese Eigenschaft ist schreibgeschützt.
Namespace: System.Net
Assembly: System (in system.dll)
Syntax
'Declaration
Public Shared ReadOnly IPv6Loopback As IPAddress
'Usage
Dim value As IPAddress
value = IPAddress.IPv6Loopback
public static readonly IPAddress IPv6Loopback
public:
static initonly IPAddress^ IPv6Loopback
public static final IPAddress IPv6Loopback
public static final var IPv6Loopback : IPAddress
Hinweise
Das IPv6Loopback-Feld entspricht 0:0:0:0:0:0:0:1 in durch Doppelpunkt getrennter Hexadezimalnotation oder ::1 in kompakter Notation.
Beispiel
Im folgenden Codebeispiel wird der Wert der aktuellen Loopback-Adresse des Hosts im komprimierten Standardformat angezeigt.
' 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 'printIPv6LoopBackAddress
// 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 method displays the value of the current host loopback address in
// standard compressed format.
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: {0}", ipv6LoopBack );
}
catch ( Exception^ e )
{
Console::WriteLine( "->Item[displayIPv6LoopBackAddress] Exception: {0}", e );
}
}
// 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(System.Exception e) {
Console.WriteLine(("[DisplayIPv6LoopBackAddress] Exception: "
+ e.ToString()));
}
} //DisplayIPv6LoopBackAddress
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1
.NET Compact Framework
Unterstützt in: 2.0