I'm wondering if its possible to get the equivalent of nslookup
in C# code?
The biggest constraint is that if the host does not exist, it must return quickly, without an excessive timeout (just like nslookup
).
Unfortunately, all of the standard C# calls such as Dns.GetHostEntry()
and Ping()
suffer from an excessive timeout if the host does not exist, which unfortunately rules them out for the purposes of this question.