using System.Net;
private void button1_Click(object sender, EventArgs e)
{
string myHost = System.Net.Dns.GetHostName();
string myIp = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();
richTextBox1.Text = (myHost);
richTextBox2.Text = (myIp);
}
private void button1_Click(object sender, EventArgs e)
{
string myHost = System.Net.Dns.GetHostName();
string myIp = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();
richTextBox1.Text = (myHost);
richTextBox2.Text = (myIp);
}
No comments:
Post a Comment