// 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; class TestClass { public static void test(string s1, string s2) { Console.WriteLine("\"" + s1 + "\"==\"" + s2 + "\" : " + (s1==s2)); Console.WriteLine("\"" + s1 + "\".Equals(\"" + s2 + "\") : " + s1.Equals(s2)); Console.WriteLine("String.Compare(\"" + s1 + "\",\"" + s2 + "\") : " + String.Compare(s1,s2)); } public static void Main(string[] args) { test("A","A"); test("a","A"); test("A","a"); test("a","a"); } }