Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OpCodes.Conv_I8 Field

Converts the value on top of the evaluation stack to int64.

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

public static readonly OpCode Conv_I8

The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:

Format

Assembly Format

Description

6A

conv.i8

Convert to int64, pushing int64 on stack.

The stack transitional behavior, in sequential order, is:

  1. value is pushed onto the stack.

  2. value is popped from the stack and the conversion operation is attempted.

  3. If the conversion is successful, the resulting value is pushed onto the stack.

The conv.i8 opcode converts the value on top of the stack to the type specified in the opcode, and leave that converted value on the top of the stack. Integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.i or conv.u is used, in which case the result is also native int). Floating-point values are converted to the F type.

Conversion from floating-point numbers to integer values truncates the number toward zero. When converting from a float64 to a float32, precision can be lost. If value is too large to fit in a float32 (F), positive infinity (if value is positive) or negative infinity (if value is negative) is returned. If overflow occurs converting one integer type to another, the high order bits are truncated. If the result is smaller than an int32, the value is sign-extended to fill the slot.

If overflow occurs converting a floating-point type to an integer the value returned is unspecified.

No exceptions are ever thrown when using this field. See Conv_Ovf_I8 and Conv_Ovf_I8_Un for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

The following Emit method overload can use the conv.i8 opcode:

  • ILGenerator.Emit(OpCode)

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

Show:
© 2014 Microsoft