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; } }
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); } }