using System;
using System.Text;
using System.Globalization;
public class App{
static void Main(string[] args){
String[] sign = new String[] { "<", "=", ">" };
String s1 = "C", s2 = "c", s3 = "c";
CompareInfo ci = new CultureInfo("fr-FR").CompareInfo;
Console.WriteLine("The LCID for {0} is {1}.", ci.Name, ci.LCID);
Console.WriteLine("fr-FR Compare: {0} {2} {1}",s1, s2, sign[ci.Compare(s1, s2, CompareOptions.IgnoreCase) + 1]);
Console.WriteLine("fr-FR Compare: {0} {2} {1}",s2, s3, sign[ci.Compare(s2, s3, CompareOptions.None) + 1]);
}
}
|