Sep 27, 2003 #1 M Morpheus Regular Joined Jan 18, 2002 Messages 62 How can I retrieve my IP-Address during Runtime? For exampel: string myIPAddress = ....
Sep 28, 2003 #2 D dynamic_sysop Senior Contributor Joined Oct 1, 2002 Messages 1,039 Location Ashby, Leicestershire. try this... C#: private void button2_Click(object sender, System.EventArgs e) { System.Net.IPHostEntry s=System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName()); MessageBox.Show(s.AddressList[0].ToString()); }
try this... C#: private void button2_Click(object sender, System.EventArgs e) { System.Net.IPHostEntry s=System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName()); MessageBox.Show(s.AddressList[0].ToString()); }