Skip to content
bagley2014 edited this page Nov 12, 2021 · 1 revision

Uri.ToString should not be used.

The Uri.ToString method returns the "unescaped canonical representation" of the URI; this has the potential to completely change the meaning of the URI. Instead, consider using a property like Uri.AbsoluteUri or Uri.OriginalString.

For a more detailed explanation, see this blog post.

Clone this wiki locally