Method Parse
Parse(string, ushort, NetworkFamily)
Same as TryParse<T>, except an endpoint is always returned. If the given address, port, and family don't represent a valid endpoint, the default one is returned.
Declaration
public static NetworkEndPoint Parse(string address, ushort port, NetworkFamily family = NetworkFamily.Ipv4)
Parameters
Type | Name | Description |
---|---|---|
string | address | String representation of the address. |
ushort | port | Return value for the parsed endpoint. |
NetworkFamily | family | Address family of 'address'. |
Returns
Type | Description |
---|---|
NetworkEndPoint | Parsed network endpoint (default if parsing failed). |