Так как IPEndpoint
содержит метод ToString()
, который выводит:
10.10.10.10:1010
Также должен быть метод Parse()
и/или TryParse()
, но его нет.
Я могу разделить строку на :
и проанализировать IP-адрес и порт.
Но есть ли более элегантный способ?