What kind of validation are you doing? Do you want to validate the
syntax of the URL? If that is the case then pass the string to the
constructor of the Uri class and it should throw an exception if the url
syntax is not valid.
If you want to validate that the resource exists, then you will need to
call the static Create method on the WebRequest class, passing the URI and
trying to connect to the resource.