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