EDIT - as pointed out in the comments, this is not the way to go.
There is such a class - the URI Class. "Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI." (Microsoft docs).
The following example creates an instance of the Uri class and uses it to create a WebRequest instance.
C# example
Uri siteUri = new Uri("http://www.contoso.com/");
WebRequest wr = WebRequest.Create(siteUri);
Check it out, there are lots of methods on this class.