MSDN Forum: system.uri doc url example error

Forrest 21 Reputation points
2022-05-14T18:35:21.86+00:00

https://learn.microsoft.com/en-us/dotnet/api/system.uri?view=net-6.0

code snippet Uri uri = new Uri("https://user:******@www.contoso.com:80/Home/Index.htm?q1=v1&q2=v2#FragmentName"); using https with 80 port. I think this example url is not suitable and invalid. By the way, is there a function about validating url https with 443, http with 80?

Thanks

Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. Ken Tucker 5,861 Reputation points
    2022-05-15T09:23:10.547+00:00

    I agree with you it should not include the :80. You should be able to submit an edit to the doc if you are signed in

    202022-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.