2PTTechnology

The platform that enables you to build rich, interactive communities
Welcome to 2PTTechnology Sign in | Join | Help
in Search

.NET Compact Framework - Get IP Address from mobile unit

Last post 02-27-2009, 11:04 AM by pskobel. 0 replies.
Sort Posts: Previous Next
  •  02-27-2009, 11:04 AM 204

    .NET Compact Framework - Get IP Address from mobile unit

    string sDeviceID = System.Net.Dns.GetHostName();
    System.Net.IPHostEntry hostEntry = System.Net.Dns.GetHostEntry(sDeviceID);
    string sIPAddress = string.Empty;

    for (int index = 0; index < hostEntry.AddressList.Length; index++)
    {
                 sIPAddress = hostEntry.AddressList[index].ToString();
    }

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems