public void IsAddressible(Uri uri, IsAddressibleCallback callback, object userToken) { using (var client = new MyClient()) { client.HeadOnly = true; client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(IsAddressibleHeadString); client.DownloadStringAsync(uri, new object[] { callback, userToken }); } }
public bool IsAddressible(Uri uri) { try { using (var client = new MyClient()) { client.HeadOnly = true; client.DownloadString(uri); return(true); } } catch (Exception loi) { } return(false); }
public bool IsAddressible(Uri uri) { try { using (var client = new MyClient()) { client.HeadOnly = true; client.DownloadString(uri); return true; } } catch (Exception loi) { } return false; }