EndPoint.Create(SocketAddress) 方法

定义

通过 SocketAddress 实例创建 EndPoint 实例。Creates an EndPoint instance from a SocketAddress instance.

public:
 virtual System::Net::EndPoint ^ Create(System::Net::SocketAddress ^ socketAddress);
public virtual System.Net.EndPoint Create (System.Net.SocketAddress socketAddress);
abstract member Create : System.Net.SocketAddress -> System.Net.EndPoint
override this.Create : System.Net.SocketAddress -> System.Net.EndPoint
Public Overridable Function Create (socketAddress As SocketAddress) As EndPoint

参数

socketAddress
SocketAddress

用作连接终结点的套接字地址。The socket address that serves as the endpoint for a connection.

返回

EndPoint

从指定的 SocketAddress 实例初始化的新 EndPoint 实例。A new EndPoint instance that is initialized from the specified SocketAddress instance.

例外

当未在子类中重写该方法时,为访问该方法进行的任何尝试。Any attempt is made to access the method when the method is not overridden in a descendant class.

适用于