private void ProcessTestAnswersOfDnsAsync(IAsyncResult ar) { DnsRequest dnsRequest = (DnsRequest)ar.AsyncState; IPAddress resolvedIP; try { IPAddress[] ips = DnsClient.EndLookupHost(ar); resolvedIP = ips[0]; this.dtr(dnsRequest.Url + ";" + resolvedIP.ToString() + ";" + dnsRequest.DnsServerIP[0].ToString()); } catch { this.dtr(dnsRequest.Url + ";" + dnsRequest.DnsServerIP[0].ToString()); } }