Udostępnij za pośrednictwem


NetworkInterface.GetByName(String) Method

Definition

Searches for the network interface with the specified name.

[Android.Runtime.Register("getByName", "(Ljava/lang/String;)Ljava/net/NetworkInterface;", "")]
public static Java.Net.NetworkInterface? GetByName (string? name);
[<Android.Runtime.Register("getByName", "(Ljava/lang/String;)Ljava/net/NetworkInterface;", "")>]
static member GetByName : string -> Java.Net.NetworkInterface

Parameters

name
String

The name of the network interface.

Returns

A NetworkInterface with the specified name, or null if the network interface with the specified name does not exist or can't be accessed.

Attributes

Exceptions

if an error occurs.

if interfaceName == null.

Remarks

Searches for the network interface with the specified name.

Java documentation for java.net.NetworkInterface.getByName(java.lang.String).

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