Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IPAddress ip = null;
- IPAddress mask = null;
- //++**********************************
- // Get IP
- //--**********************************
- strHostName = Dns.GetHostName();
- IPHostEntry iphe = Dns.GetHostEntry(strHostName);
- foreach (IPAddress ipheal in iphe.AddressList)
- {
- if (ipheal.AddressFamily ==AddressFamily.InterNetwork)
- {
- ip = ipheal;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement