using System; using System.IO; using System.Collections.Generic; using M17N; using M17N.Core; public class Test { public static void Main() { MSymbol sym1 = MSymbol.Of ("sym1"); MSymbol sym2 = MSymbol.Of ("sym2"); MPlist plist = new MPlist (); MText mt1 = new MText ("abc"); MText mt2 = new MText ("ABC"); plist.Put (sym1, mt1); plist.Put (sym2, mt2); Console.WriteLine (plist); foreach (MPlist p in plist) Console.WriteLine (p.Key + ":" + p.Val); Console.WriteLine (plist.Clone ()); M17n.debug = true; using (FileStream stream = File.OpenRead ("temp.plist")) { Console.WriteLine (new MPlist (stream)); } plist = new MPlist (); plist.Push (MSymbol.Of ("abc")); plist.Push (new MText ("abc")); plist.Push (new MPlist ()); plist.Push (123); plist.Push (4.5); Console.WriteLine (plist); Console.WriteLine ("plist[3] = " + plist[3]); MSymbol tmp = MSymbol.nil; if (tmp == null) Console.WriteLine ("null"); } }