NetworkInterface.GetByName(String) 方法

定义

搜索具有指定名称的网络接口。

[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

参数

name
String

网络接口的名称。

返回

具有指定名称的网络接口 NetworkInterface ,或者 null 具有指定名称的网络接口不存在或无法访问。

属性

例外

如果发生错误,则为

如果 interfaceName == null

注解

搜索具有指定名称的网络接口。

Java文档java.net.NetworkInterface.getByName(java.lang.String)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于