Beispiel #1
0
        private bool IsValidUrl(string url)
        {
            try
            {
                using (var webClient = new WebClientExtension())
                {
                    webClient.HeadOnly = true;
                    webClient.DownloadString(url);
                }
            }
            catch (WebException)
            {
                return(false);
            }

            return(true);
        }
        private bool IsValidUrl(string url)
        {
            try
            {
                using (var webClient = new WebClientExtension())
                {
                    webClient.HeadOnly = true;
                    webClient.DownloadString(url);
                }
            }
            catch (WebException)
            {
                return false;
            }

            return true;
        }