Skip to content

Instantly share code, notes, and snippets.

@vkbandi
Last active September 17, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkbandi/a1759d0af213bfdc577e to your computer and use it in GitHub Desktop.
Save vkbandi/a1759d0af213bfdc577e to your computer and use it in GitHub Desktop.
A sample code to display the usage of the whois class
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