EmitWriteLine Method (FieldInfo)
Collapse the table of content
Expand the table of content

ILGenerator.EmitWriteLine Method (FieldInfo)

[ 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 field.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public virtual void EmitWriteLine(
	FieldInfo fld


Type: System.Reflection.FieldInfo
The field whose value is to be written to the console.


There is no overload of the Console.WriteLine method that accepts the type of the specified field.


fld is null.


The type of the field is a dynamic type, which is not supported.

In Windows Phone applications, there is no practical use for the EmitWriteLine method.

The type of fld must match the parameter type of an overload of the Console.WriteLine method.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

© 2017 Microsoft