// 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.Threading; using System.Globalization; namespace E { public class MainClass { public static void Main(string[] args) { //Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK", false); //Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); string s1 = "ÆØÅ"; string s2 = "æøå"; Console.WriteLine(String.Compare(s1, s2)); Console.WriteLine(String.Compare(s1, s2, true)); Console.WriteLine(String.Compare(s1, s2, true, new CultureInfo("da-DK", false))); Console.WriteLine(String.Compare(s1, s2, StringComparison.CurrentCultureIgnoreCase)); } } }