public bool UriExists(string url)
{
try
{
new System.Net.WebClient().OpenRead(url);
return true;
}
catch (System.Net.WebException)
{
return false;
}
}
原文地址:http://www.cnblogs.com/lxshanye/p/3752824.html