Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net;
- using System.Net.NetworkInformation;
- class HelloWorld {
- static void Main() {
- IPHostEntry data = Dns.GetHostByName("google.com");
- Console.WriteLine("Host: {0}", data.HostName);
- for(int item=0; item < data.AddressList.Length - 1; item++)
- {
- Console.WriteLine("Associated Address: {0}", data.AddressList[item]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement