Created
January 30, 2015 09:43
-
-
Save chgeuer/57b069859c0b4143b4e2 to your computer and use it in GitHub Desktop.
Retrieve DNS Records
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <package id="Heijden.Dns" version="1.0.0" targetFramework="net45" /> | |
var aRecord = new Heijden.DNS.Resolver().Query("somedomain.de", Heijden.DNS.QType.A); | |
foreach (var x in aRecord.Answers) | |
Console.WriteLine("Answer: {0} is an {1} record for {2} (TTL {3})", | |
x.NAME, x.Type, x.RECORD, TimeSpan.FromSeconds( x.TTL)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment