X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mtext.cs;h=bc8dad5b4ada9de8e36e3322806f2096249f6573;hb=c3ac31d76f0ec73cf72908e4369c95d21c3d3a57;hp=59c32459f132c20aa2fa2f6a373a0365035ba266;hpb=471297b4ac15917a2500cc391f2f1e28311e4308;p=m17n%2Fm17n-lib-cs.git diff --git a/mtext.cs b/mtext.cs index 59c3245..bc8dad5 100644 --- 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); } }