code=C#]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;using System.Net;
using System.Net.Sockets;
using System.Threading;namespace WindowsDns
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
CheckForIllegalCrossThreadCalls = false;
} private void button1_Click(object sender, EventArgs e)
{
IPHostEntry iphe = new IPHostEntry();
iphe = Dns.Resolve("www.163.com");
for (int i = 0; i < iphe.AddressList.Length; i++)
{
richTextBox1.AppendText(iphe.AddressList[i].ToString()+Environment.NewLine);
}
}
}
}[
[/code]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;using System.Net;
using System.Net.Sockets;
using System.Threading;namespace WindowsDns
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
CheckForIllegalCrossThreadCalls = false;
} private void button1_Click(object sender, EventArgs e)
{
IPHostEntry iphe = new IPHostEntry();
iphe = Dns.Resolve("www.163.com");
for (int i = 0; i < iphe.AddressList.Length; i++)
{
richTextBox1.AppendText(iphe.AddressList[i].ToString()+Environment.NewLine);
}
}
}
}[
[/code]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货