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
220.127.116.11. 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.