Поделиться через


ILGenerator.EmitWriteLine Method (LocalBuilder)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Emits the Microsoft intermediate language (MSIL) necessary to call Console.WriteLine with the given local variable.

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

Syntax

'Declaration
Public Overridable Sub EmitWriteLine ( _
    localBuilder As LocalBuilder _
)
public virtual void EmitWriteLine(
    LocalBuilder localBuilder
)

Parameters

Exceptions

Exception Condition
ArgumentException

The type of localBuilder is TypeBuilder or EnumBuilder, which are not supported.

-or-

There is no overload of Console.WriteLine that accepts the type of localBuilder.

ArgumentNullException

localBuilder is nulla null reference (Nothing in Visual Basic).

Remarks

In Silverlight-based 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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.