I\'d like to know if there\'s any way to force the System.Net.Dns class to resolve hostnames using a set of custom DNS servers instead of using the ones that are associated
If you're able to run your application inside a docker container you can provide the dns server ip address on start up.
docker run --dns=1.2.3.4 repo/myimage command.exe
https://docs.docker.com/v17.09/engine/userguide/networking/configure-dns/