2003-01-10 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Fri, 10 Jan 2003 19:33:12 +0000 (19:33 -0000)
committerZoltan Varga <vargaz@gmail.com>
Fri, 10 Jan 2003 19:33:12 +0000 (19:33 -0000)
* ILGenerator.cs: Implemented EmitWriteLine(string).

svn path=/trunk/mcs/; revision=10359

mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs

index 2ad1c385f3f2ed6a41d398ab2b0a47adced5d14d..d9d1803b78b91c70193393e1a9a708ea00ba26c6 100644 (file)
@@ -1,5 +1,7 @@
 2003-01-10  Zoltan Varga  <vargaz@freemail.hu>
 
+       * ILGenerator.cs: Implemented EmitWriteLine(string).
+
        * TypeBuilder.cs (DefineInitializedData): Call DefineNestedType() 
        instead of DefineType() so the auxiliary types do not pollute the 
        global namespace. This is consistent with the behaviour of MS .NET.
index 837f3e857ae7ecc8da6083882953fa2c84c3a015..6276b3677e079f94d0caf6bf9ae4afeea68e9730 100644 (file)
@@ -571,7 +571,10 @@ namespace System.Reflection.Emit {
                        throw new NotImplementedException ();
                }
                public virtual void EmitWriteLine (string val) {
-                       throw new NotImplementedException ();
+                       Emit (OpCodes.Ldstr, val);
+                       Emit (OpCodes.Call, 
+                                 typeof (Console).GetMethod ("WriteLine",
+                                                                                         new Type[1] { typeof(string)}));
                }
 
                public virtual void EndExceptionBlock () {