Esempio n. 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;
     }
 }
Esempio n. 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);
     }
 }