RSS

Tag Archives: first

C# First or Default IP Address


IPHostEntry localHostEntry = Dns.GetHostEntry("");

_LocalIpAddress = localHostEntry.AddressList.FirstOrDefault(current => current.AddressFamily == AddressFamily.InterNetwork).ToString();

 
Leave a comment

Posted by on August 22, 2011 in .net, c#, Uncategorized

 

Tags: , , , , , ,