System.Net.EndPoint.Create Method

Creates an System.Net.EndPoint instance from a System.Net.SocketAddress instance.

Syntax

public virtual EndPoint Create (SocketAddress socketAddress)

Parameters

socketAddress
The socket address that serves as the endpoint for a connection.

Returns

A new System.Net.EndPoint instance that is initialized from the specified System.Net.SocketAddress instance.

Exceptions

TypeReason
NotSupportedExceptionThis method is required to be overridden in types derived from System.Net.EndPoint .

Remarks

Operation
As described above.

The default implementation throws NotSupportedException.

Note to Inheritors
Override this method to return a System.Net.EndPoint instance that contains the address information from the specified System.Net.SocketAddress.

Usage
Use this method to obtain a System.Net.EndPoint instance that represents the same network resource or service as the specified System.Net.SocketAddress.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0