NetworkInterface.GetByIndex(Int32) Method

Definition

Get a network interface given its index.

[Android.Runtime.Register("getByIndex", "(I)Ljava/net/NetworkInterface;", "")]
public static Java.Net.NetworkInterface? GetByIndex (int index);
[<Android.Runtime.Register("getByIndex", "(I)Ljava/net/NetworkInterface;", "")>]
static member GetByIndex : int -> Java.Net.NetworkInterface

Parameters

index
Int32

an integer, the index of the interface

Returns

NetworkInterface

the NetworkInterface obtained from its index, or null if an interface with the specified index does not exist or <a href="#access-restrictions">can't be accessed</a>.

Attributes

Exceptions

if an error occurs.

Remarks

Java documentation for java.net.NetworkInterface.getByIndex(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to