Socket.SupportsIPv4 Socket.SupportsIPv4 Socket.SupportsIPv4 Socket.SupportsIPv4 Property

定义

警告

此 API 现已过时。

获取一个值,该值指示在当前主机上 IPv4 支持是否可用并且已启用。Gets a value indicating whether IPv4 support is available and enabled on the current host.

public:
 static property bool SupportsIPv4 { bool get(); };
[System.Obsolete("Use OSSupportsIPv4 instead")]
[System.Obsolete("SupportsIPv4 is obsoleted for this type, please use OSSupportsIPv4 instead. http://go.microsoft.com/fwlink/?linkid=14202")]
[System.Obsolete("SupportsIPv4 is obsoleted for this type, please use OSSupportsIPv4 instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static bool SupportsIPv4 { get; }
member this.SupportsIPv4 : bool
Public Shared ReadOnly Property SupportsIPv4 As Boolean

属性值

如果当前主机支持 IPv4 协议,则为 true;否则为 falsetrue if the current host supports the IPv4 protocol; otherwise, false.

注解

操作系统可能会支持 IPv4 和 IPv6 协议。The operating system may support both IPv4 and IPv6 protocols.

适用于

另请参阅