Я пробовал
Код: Выделить всё
public static bool ResolveTest(string hostNameOrAddress, TimeSpan time_out)
{
var result = Dns.BeginGetHostEntry(hostNameOrAddress, null, null);
var success = result.AsyncWaitHandle.WaitOne(time_out);
if (!success) {
//throw new Exception("Failed to resolve the domain.");
return false;
}
return true;
}
Подробнее здесь: https://stackoverflow.com/questions/389 ... ve-timeout
Мобильная версия