Elegant way parsing URL April 22, 2023 by Tarik Using the URI class you can do this: var url = new Uri("your url");