[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the local endpoint.
Assembly: System (in System.dll)
The property gets an EndPoint that contains the local IP address and port number to which your Socket is bound. You must cast this EndPoint to an IPEndPoint before retrieving any information. You can then call the IPEndPoint..::..Address method to retrieve the local IPAddress, and the IPEndPoint..::..Port method to retrieve the local port number.
The property is usually set after you make a call to the Bind method. If you allow the system to assign your socket's local IP address and port number, the property will be set after the first I/O operation. For connection-oriented protocols, the first I/O operation would be a call to the Connect or Accept method. For connectionless protocols, the first I/O operation would be any of the send or receive calls.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.