Method TryParse
TryParse(string, ushort, out NetworkEndPoint, NetworkFamily)
Try to parse the given address and port into a new NetworkEndPoint.
Declaration
public static bool TryParse(string address, ushort port, out NetworkEndPoint endpoint, NetworkFamily family = NetworkFamily.Ipv4)
Parameters
Type | Name | Description |
---|---|---|
string | address | String representation of the address. |
ushort | port | Port number. |
NetworkEndPoint | endpoint | Return value for the parsed endpoint. |
NetworkFamily | family | Address family of 'address'. |
Returns
Type | Description |
---|---|
bool | Whether the endpoint was successfully parsed or not. |