using System; public class testuri { public static void Main(string[] args) { string[,] test = { {"http://example.com/", "http://example.com"}, {"HTTP://example.com/", "http://example.com/"}, {"http://example.com/", "http://example.com:/"}, {"http://example.com/", "http://example.com:80/"}, {"http://example.com/", "http://Example.com/"}, {"http://example.com/~smith/", "http://example.com/%7Esmith/"}, {"http://example.com/~smith/", "http://example.com/%7esmith/"}, {"http://example.com/%7Esmith/", "http://example.com/%7esmith/"}, {"http://example.com/%C3%87", "http://example.com/C%CC%A7"}, }; for (int i=0; i<=test.GetUpperBound(0); i++) { Console.Write(test[i,0].PadRight(29)); Console.Write(test[i,1].PadRight(29)); Console.WriteLine((new Uri(test[i,0])).Equals(new Uri(test[i,1]))); } } }