Επεξεργασία

Κοινή χρήση μέσω


NetworkInterface.LoopbackInterfaceIndex Property

Definition

Gets the index of the IPv4 loopback interface.

public:
 static property int LoopbackInterfaceIndex { int get(); };
public static int LoopbackInterfaceIndex { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static int LoopbackInterfaceIndex { get; }
static member LoopbackInterfaceIndex : int
[<System.Runtime.Versioning.UnsupportedOSPlatform("illumos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("solaris")>]
static member LoopbackInterfaceIndex : int
Public Shared ReadOnly Property LoopbackInterfaceIndex As Integer

Property Value

A Int32 that contains the index for the IPv4 loopback interface.

Attributes

Exceptions

This property is not valid on computers running only Ipv6.

Remarks

The index of the loopback interface is usually 1, but you cannot rely on this. Use the LoopbackInterfaceIndex property to get the correct value.

A network interface may have different interface indexes for the IPv4 and IPv6 loopback interface. The LoopbackInterfaceIndex property only returns the IPv4 loopback interface.

Applies to

See also