Clears and then populates the collection with DnsServer objects by looking up the following sources:
true if at least one DNS server was found; otherwise, false.
Once at least one DNS server definition is found, these definitions are added to the collection as DnsServer objects, and the method returns.
You can find more information and code samples on MailBee DNS server autodetection mechanism in DnsAutodetectOptions enumeration documentation.
Note WMI database search requires Full trust for MailBee assembly. If the current security setting is lower than Full trust, WMI database search won't find any DNS server definitions.
DnsServerCollection Class | MailBee.DnsMX Namespace | DnsServerCollection.Autodetect Overload List | DnsAutodetectOptions