Sep 27, 2003 #1 M Morpheus Well-known member Joined Jan 18, 2002 Messages 62 How can I retrieve my IP-Address during Runtime? For exampel: string myIPAddress = ....
Sep 28, 2003 #2 dynamic_sysop Well-known member 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()); }