NetworkInterface::LoopbackInterfaceIndex Property
.NET Framework (current version)
Gets the index of the IPv4 loopback interface.
Assembly: System (in System.dll)
| Exception | Condition |
|---|---|
| NetworkInformationException | This property is not valid on computers running only Ipv6. |
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: