Last active
September 17, 2015 15:39
-
-
Save vkbandi/a1759d0af213bfdc577e to your computer and use it in GitHub Desktop.
A sample code to display the usage of the whois class
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace DomainTools | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Enter a domain name to get the whois information."); | |
var domainName = Console.ReadLine(); | |
try | |
{ | |
var whoisText = Whois.Lookup(domainName); | |
Console.WriteLine(whoisText); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.ToString()); | |
} | |
Console.WriteLine("Press any key to exit.."); | |
Console.Read(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment