Hi friends,
I try to get the ip of the local computer in WPF but it fail...
I allready done that in WinForm but in WPF it does not work.
can someone give me a little code that works?
Thank you all.
Printable View
Hi friends,
I try to get the ip of the local computer in WPF but it fail...
I allready done that in WinForm but in WPF it does not work.
can someone give me a little code that works?
Thank you all.
Post the code that you are using to grab the IP in WinForms.
IPAddress[] a = Dns.GetHostByName(Dns.GetHostName()).AddressList;
string ip = a[0].ToString();
txtIp.Text = ip;
What exactly doesn't work?