.net类库问题(新手请教)
private void button1_Click(object sender, EventArgs e){
string name;
name = Dns.GetHostName();
textBox1.Text = name;
IPHostEntry me = Dns.GetHostByName(name);
foreach (IPAddress my in me.AddressList)
textBox2.Text = me.ToString();
}
为什么会提示说类库 Dns.GetHostByName()已过期,我用什么方式能获取本机的IP啊