Best way to create IPEndpoint from string

后端 未结 13 2025
失恋的感觉
失恋的感觉 2020-12-03 06:33

Since IPEndpoint contains a ToString() method that outputs:

10.10.10.10:1010

There should also be

13条回答
  •  死守一世寂寞
    2020-12-03 07:13

    Apparently, IPEndPoint.Parse and IPEndPoint.TryParse were added in .NET Core 3.0.

    In case you're targeting it, give those methods a try! The implementation is seen in the link above.

提交回复
热议问题