2 using System.Collections.Generic;
9 public static void Main()
11 MCharTable tbl = new MCharTable ();
13 tbl[0x100] = MSymbol.Of ("test-100");
14 tbl[0x101] = MSymbol.Of ("test-101");
15 tbl[0xFFF] = MSymbol.Of ("test-FFF");
16 tbl[0x1000] = MSymbol.Of ("test-1000");
18 tbl[0x2070, 0x4001] = MSymbol.t;
20 Console.WriteLine ("# Direct access by tbl[CHAR]");
21 Console.WriteLine ("0x100:{0}, 0x1000:{1}", tbl[0x100], tbl[0x1000]);
22 Console.WriteLine ("0x206F:{0}, 0x2070:{1}, 0x4001:{2}, 0x4002:{3}",
23 tbl[0x206F], tbl[0x2070], tbl[0x4001], tbl[0x4002]);
25 Console.WriteLine ("# Enumerate on tbl");
26 foreach (MCharRange range in tbl)
27 Console.WriteLine (range);
29 Console.WriteLine ("# Using CharRange from U+3000 to U+0");
30 MCharRange r = new MCharRange (0x3000, tbl);
32 Console.WriteLine (r);