ILGenerator.EmitWriteLine Method (LocalBuilder)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Emits the Microsoft intermediate language (MSIL) necessary to call Console.WriteLine with the given local variable.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- localBuilder
- Type: System.Reflection.Emit.LocalBuilder
The local variable whose value is to be written to the console.
| Exception | Condition |
|---|---|
| ArgumentException | The type of localBuilder is a dynamic type, which is not supported. -or- There is no overload of Console.WriteLine that accepts the type of localBuilder. |
| ArgumentNullException | localBuilder is null. |
In Windows Phone applications, there is no practical use for the EmitWriteLine method.
The type of localBuilder must match the parameter type of an overload of the Console.WriteLine method.