StringComparer.Create(turkish, true);
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
class Sample
{
public static void Main()
{
List<string> list = new List<string>();
CultureInfo turkish = new CultureInfo("tr-TR");
CultureInfo thisCulture = Thread.CurrentThread.CurrentCulture;
StringComparer invCmp = StringComparer.Create(turkish, true);
list.Add("I");
list.Add("i");
list.Add("\u0131");
list.Sort(invCmp);
Display(list);
}
public static void Display(List<string> lst)
{
foreach (string s in lst)
{
Char c = s[0];
int codePoint = Convert.ToInt32(c);
Console.WriteLine("0x{0:x}", codePoint);
}
}
}
Related examples in the same category