*** empty log message ***
[m17n/m17n-lib-cs.git] / mtext.cs
index 59c3245..bc8dad5 100644 (file)
--- a/mtext.cs
+++ b/mtext.cs
@@ -27,5 +27,13 @@ public class Test
     Console.WriteLine (mt);
     mt[1,2] = null;            // == mt.Del (1, 2)
     Console.WriteLine (mt);
+    // explicit casting (MText -> string)
+    string str2 = " " + (string) mt + (string) ((MText) "abc").Cat ('a');
+    Console.WriteLine (str2);
+    // implicit casting (string -> MText)
+    mt2 = "abc";
+    mt2.Cat ("def");
+    mt2 += "ghi";
+    Console.WriteLine (mt2);
   }
 }