using System.Net;
using System.Net.Sockets;
string name = Dns.Get
hostname();
var ipv4 = Dns.GetHostEntry(name).AddressList.Where(i => i.AddressFamily == AddressFamily.InterNetwork).FirstOrDefault();
textBox1.Text =string.Format("{0}:{1}",name,ipv4.ToString());