Example #1
0
 public static bool IsValidUrl(this string input)
 {
     try
     {
         using (var client = new MyClient())
         {
             client.HeadOnly = true;
             string s1 = client.DownloadString(input);
         }
         return true;
     }
     catch (Exception)
     {
         return false;
     }
 }
Example #2
0
 public static bool IsValidUrl(this string input)
 {
     try
     {
         using (var client = new MyClient())
         {
             client.HeadOnly = true;
             string s1 = client.DownloadString(input);
         }
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }