TraceRoute and Ping in C#

Given that I had to write a TraceRoute class today I figured I might as well share the source code. using System.Collections.Generic; using System.Net.NetworkInformation; using System.Text; using System.Net; namespace Answer { public class TraceRoute { private const string Data = “aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa”; public static IEnumerable<IPAddress> GetTraceRoute(string hostNameOrAddress) { return GetTraceRoute(hostNameOrAddress, 1); } private static IEnumerable<IPAddress> GetTraceRoute(string … Read more