public static void GetPing(DNSInfo dns) { List <long> result = new List <long>(); for (int i = 0; i < 3; i++) { var p = Ping(dns.DNS); result.Add(p); } result.Sort((a, b) => a.CompareTo(b)); dns.Ping = result[0]; }
private void cbDNSType_SelectedIndexChanged(object sender, EventArgs e) { if (cbDNSType.SelectedIndex > 0) { DNSInfo dnsInfo = cbDNSType.SelectedItem as DNSInfo; if (dnsInfo != null) { txtPreferredDNS.Text = dnsInfo.PrimaryDNS; txtAlternateDNS.Text = dnsInfo.SecondaryDNS; } } UpdateControls(); }