16BPP.net
 
 
 
 
 Previous Page   DNS   Next Page 

DNS

The Dns class is a static object contained in System.Net that stands as a tool for domain name services.  This is very handy if you want to let your users type in a domain like 16bpp.net instead of 107.170.178.215.  For those of you who don't know what DNS is or what it does, it's magic that turns letters into numbers.

The Dns class contains a few methods for resolving host names and other things.  You can do it both synchronously and asynchronously.  The important methods of this class will either return IPAddress objects the more detailed IPHostEntry.  The latter is nice if you want to get an aliases associated with the queried hostname.  Keep in mind that one domain name might have multiple IP addresses associated with it.

 

 

As I said, there is an asynchronous version of Dns.GethostEntry().  If you just care about the addresses, there are methods for that too.

 Previous Page   DNS   Next Page