using System; class StringApp{ public static void Main(){ ReportCompare(new String(), new String(1)); ReportCompare(new String(1), new String(1)); ReportCompare(new String(1,2,3), new String(1)); ReportCompare(new String(false), new String(false, true, false)); ReportCompare(new String(true, true, false), new String(true, true, false)); } public static void ReportCompare(String s, String t) where T: IComparable{ Console.WriteLine("Result of comparing {0} and {1}: {2}", s, t, s.CompareTo(t)); } }