GetSortKey() public method

public GetSortKey ( string s ) : SortKey
s string
return System.Globalization.SortKey
Beispiel #1
0
 void Generate()
 {
     // dump sortkey for every single character.
     for (int i = 0; i <= char.MaxValue; i++)
     {
         byte [] data = coll.GetSortKey(new string ((char)i, 1), CompareOptions.StringSort).KeyData;
         if (data.Length == 5 && data [0] == 1 && data [1] == 1 &&
             data [2] == 1 && data [3] == 1 && data [4] == 0)
         {
             continue;
         }
         foreach (byte b in data)
         {
             Console.Write("{0:X02} ", b);
         }
         Console.WriteLine(" : {0:X04}, {1}",
                           i, Char.GetUnicodeCategory((char)i));
     }
 }