You shouldn't ever need to. Any time you do something that results in
a DNS name resolution (such as WebRequest.Create() with a domain
name), the OS itself will consult the hosts file, and similarly, every
time there is a NetBIOS name resolution (such as File.Open() with an
UNC path), the OS will consult lmhosts.