// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.IO; using System.Net.Sockets; namespace E { public class MainClass { public static void Main(string[] args) { TcpClient cli = new TcpClient("whois.networksolutions.com", 43); Stream stm = cli.GetStream(); StreamWriter sw = new StreamWriter(stm); StreamReader sr = new StreamReader(stm); sw.WriteLine("ibm.com"); sw.Flush(); string line; while((line = sr.ReadLine()) != null) { Console.WriteLine(line); } cli.Close(); } } }