mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Runtime.InteropServices.ComVisible(true)

For a detailed description of the member opcodes, see the Common Language Infrastructure (CLI) documentation, especially "Partition III: CIL Instruction Set" and "Partition II: Metadata Definition and Semantics". The documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.

Provides field representations of the Microsoft Intermediate Language (MSIL) instructions for emission by the class members (such as ).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  58

  add

  Adds two numeric values, returning a new numeric value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is added to .

  The result is pushed onto the stack.

  Overflow is not detected for integer operations (for proper overflow handling, see ).

  Integer addition wraps, rather than saturates. For example, assuming 8-bit integers where is set to 255 and is set to 1, the wrapped result is 0 rather than 256.

  Floating-point overflow returns +inf (PositiveInfinity) or -inf (NegativeInfinity).

  The acceptable operand types and their corresponding result data type are listed in the table below. If there is no entry for a particular type combination (for example, int32 and float; int32 and int64), it is an invalid Microsoft Intermediate Language (MSIL) and generates an error.

  operand

  value1 type

  value2 type

  result type

  add

  int32

  int32

  int32

  add

  int32

  native int

  native int

  add

  int32

  &

  &

  add

  int32

  *

  *

  add

  int64

  int64

  int64

  add

  native int

  int32

  native int

  add

  native int

  native int

  native int

  add

  native int

  &

  &

  add

  native int

  *

  *

  add

  F

  F

  F

  add

  &

  int32

  &

  add

  &

  native int

  &

  add

  *

  int32

  *

  add

  *

  native int

  *

  The following method overload can use the add opcode:

  ILGenerator.Emit(OpCode)

  Adds two values and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D6

  add.ovf

  Adds two signed integer values with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is added to with a check for overflow.

  The result is pushed onto the stack.

  is thrown if the result is not represented in the result type.

  You can perform this operation on signed integers. For floating-point values, use .

  The acceptable operand types and their corresponding result data type are listed in the table below. If there is no entry for a particular type combination (for example, int32 and float; int32 and int64), it is an invalid Microsoft Intermediate Language (MSIL) instruction and generates an error.

  operand

  value1 type

  value2 type

  result type

  add

  int32

  int32

  int32

  add

  int32

  native int

  native int

  add

  int32

  &

  &

  add

  int32

  *

  *

  add

  int64

  int64

  int64

  add

  native int

  int32

  native int

  add

  native int

  native int

  native int

  add

  native int

  &

  &

  add

  native int

  *

  *

  add

  F

  F

  F

  add

  &

  int32

  &

  add

  &

  native int

  &

  add

  *

  int32

  *

  add

  *

  native int

  *

  The following method overload can use the add.ovf opcode:

  ILGenerator.Emit(OpCode)

  Adds two integers, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D7

  add.ovf.un

  Adds two unsigned integer values with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is added to with a check for overflow.

  The result is pushed onto the stack.

  is thrown if the result is not represented in the result type.

  You can perform this operation on signed integers. For floating-point values, use .

  The acceptable operand types and their corresponding result data type are listed in the table below. If there is no entry for a particular type combination (for example, int32 and float; int32 and int64), it is an invalid Microsoft Intermediate Language (MSIL) instruction and generates an error.

  operand

  value1 type

  value2 type

  result type

  add

  int32

  int32

  int32

  add

  int32

  native int

  native int

  add

  int32

  &

  &

  add

  int32

  *

  *

  add

  int64

  int64

  int64

  add

  native int

  int32

  native int

  add

  native int

  native int

  native int

  add

  native int

  &

  &

  add

  native int

  *

  *

  add

  F

  F

  F

  add

  &

  int32

  &

  add

  &

  native int

  &

  add

  *

  int32

  *

  add

  *

  native int

  *

  The following method overload can use the add.ovf.un opcode:

  ILGenerator.Emit(OpCode)

  Adds two unsigned integer values, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

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

  Format

  Instruction

  Description

  5F

  and

  Determines the bitwise AND of two integer values.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; the bitwise AND of the two values is computed.

  The result is pushed onto the stack.

  The and instruction computes the bitwise AND of the top two values on the stack and leaves the result on the stack.

  And is an integer-specific operation.

  The following method overload can use the and opcode:

  ILGenerator.Emit(OpCode)

  Computes the bitwise AND of two values and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 00

  arglist

  Returns an argument list handle for the current method.

  No evaluation stack behaviors are performed by this operation.

  The arglist instruction returns an opaque handle (an unmanaged pointer, of type native int) that represents the argument list of the current method. This handle is valid only during the lifetime of the current method. You can, however, pass the handle to other methods as long as the current method is on the thread of control. You can only execute the arglist instruction within a method that takes a variable number of arguments.

  The following method overload can use the arglist opcode:

  ILGenerator.Emit(OpCode)

  Returns an unmanaged pointer to the argument list of the current method.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3B < int32 >

  beq

  Branch to the target instruction at offset if the two values are equal.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is equal to , the branch operation is performed.

  The beq instruction transfers control to the specified target instruction if is equal to . The effect is the same as performing a ceq instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  The acceptable operand types are encapsulated below:

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

  Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead).

  The following method overload can use the beq opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if two values are equal.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2E < int8 >

  beq.s

  Branch to the target instruction at offset if equal, short form

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is equal to , the branch operation is performed.

  The beq.s instruction transfers control to the specified target instruction if is equal to . The effect is the same as performing a ceq instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  The acceptable operand types are encapsulated below:

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

  Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead).

  The following method overload can use the beq.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if two values are equal.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3C <int32>

  bge

  Branch to the target instruction at the specified offset if the first value is greater than or equal to the second value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than or equal to , the branch operation is performed.

  The bge instruction transfers control to the specified target instruction if is greater than or equal to . The effect is identical to performing a clt.un instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bge opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is greater than or equal to the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2F <int8>

  bge.s

  Branch to the target instruction at the specified offset if the first value is greater than or equal to the second value, short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than or equal to , the branch operation is performed.

  The bge.s instruction transfers control to the specified target instruction if is greater than or equal to . The effect is identical to performing a clt.un instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bge.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is greater than or equal to the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  41 <int32>

  bge.un

  Branch to the target instruction at the specified offset if the first value is greater than or equal to the second value (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than or equal to , the branch operation is performed.

  The bge.un instruction transfers control to the specified target instruction if is greater than or equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a clt instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bge.un opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is greater than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  34 < int8 >

  bge.un.s

  Branch to the target instruction at the specified offset if the first value is greater than or equal to the second value (unsigned values), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than or equal to , the branch operation is performed.

  The bge.un.s instruction transfers control to the specified target instruction if is greater than or equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a clt instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bge.un.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is greater than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3D < int32 >

  bgt

  Branch to the target instruction at the specified offset if the first value is greater than the second value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than , the branch operation is performed.

  The bgt instruction transfers control to the specified target instruction if is greater than . The effect is identical to performing a cgt instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bgt opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is greater than the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  30 < int8 >

  bgt.s

  Branch to the target instruction at the specified offset if the first value is greater than the second value, short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than , the branch operation is performed.

  The bgt.s instruction transfers control to the specified target instruction if is greater than . The effect is identical to performing a cgt instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bgt.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is greater than the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  42 < int32 >

  bgt.un

  Branch to the target instruction at the specified offset if the first value is greater than the second value (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than , the branch operation is performed.

  The bgt.un instruction transfers control to the specified target instruction if is greater than , when compared using unsigned integer or unordered float values. The effect is identical to performing a cgt.un instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bgt.un opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is greater than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  35 < int8 >

  bgt.un.s

  Branch to the target instruction at the specified offset if the first value is greater than the second value (unsigned values), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is greater than , the branch operation is performed.

  The bgt.un.s instruction transfers control to the specified target instruction if is greater than , when compared using unsigned integer or unordered float values. The effect is identical to performing a cgt.un instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bgt.un.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is greater than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3E <int32>

  ble

  Branch to the target instruction at the specified offset if the first value is less than or equal to the second value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than or equal to , the branch operation is performed.

  The ble instruction transfers control to the specified target instruction if is less than or equal to . The effect is identical to performing a cgt instruction (cgt.un for floats) followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the ble opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is less than or equal to the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  31 <int8>

  ble.s

  Branch to the target instruction at the specified offset if the first value is less than or equal to the second value, short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than or equal to , the branch operation is performed.

  The ble.s instruction transfers control to the specified target instruction if is less than or equal to . The effect is identical to performing a cgt instruction (cgt.un for floats) instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the ble.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is less than or equal to the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  43 <int32>

  ble.un

  Branch to the target instruction at the specified offset if the first value is less than or equal to the second value (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than or equal to , the branch operation is performed.

  The ble.un instruction transfers control to the specified target instruction if is less than or equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a cgt.un instruction (cgt for floats) followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the ble.un opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is less than or equal to the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  36 <int8>

  ble.un.s

  Branch to the target instruction at the specified offset if the first value is less than or equal to the second value (unsigned values), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than or equal to , the branch operation is performed.

  The ble.un.s instruction transfers control to the specified target instruction if is less than or equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a cgt.un instruction (cgt for floats) followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the ble.un.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is less than or equal to the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3F < int32 >

  blt

  Branch to the target instruction at the specified offset if the first value is less than the second value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than , the branch operation is performed.

  The blt instruction transfers control to the specified target instruction if is less than or equal to . The effect is identical to performing a clt instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the blt opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is less than the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  32 < int8 >

  blt.s

  Branch to the target instruction at the specified offset if the first value is less than the second value, short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than , the branch operation is performed.

  The blt.s instruction transfers control to the specified target instruction if is less than . The effect is identical to performing a clt instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the blt.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is less than the second value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  44 < int32 >

  blt.un

  Branch to the target instruction at the specified offset if the first value is less than the second value (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than , the branch operation is performed.

  The blt.un instruction transfers control to the specified target instruction if is less than , when compared using unsigned integer or unordered float values. The effect is identical to performing a clt.un instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the blt.un opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if the first value is less than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  37 < int8 >

  blt.un.s

  Branch to the target instruction at the specified offset if the first value is less than the second value (unsigned values), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is less than , the branch operation is performed.

  The blt.un instruction transfers control to the specified target instruction if is less than , when compared using unsigned integer or unordered float values. The effect is identical to performing a clt.un instruction followed by a brtrue branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the blt.un.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if the first value is less than the second value, when comparing unsigned integer values or unordered float values.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  40 < int32 >

  bne.un

  Branch to the target instruction at the specified offset if two unsigned integer values are not equal (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is not equal to , the branch operation is performed.

  The bne.un instruction transfers control to the specified target instruction if is not equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a ceq instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bne.un opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction when two unsigned integer values or unordered float values are not equal.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  33 < int8 >

  bne.un.s

  Branch to the target instruction at the specified offset if two unsigned integer values are not equal (unsigned values), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; if is not equal to , the branch operation is performed.

  The bne.un instruction transfers control to the specified target instruction if is not equal to , when compared using unsigned integer or unordered float values. The effect is identical to performing a ceq instruction followed by a brfalse branch to the specific target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the bne.un.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) when two unsigned integer values or unordered float values are not equal.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8C < T >

  box

  Convert a value type (of the type specified in ) to a true object reference.

  The stack transitional behavior, in sequential order, is:

  A value type is pushed onto the stack.

  The value type is popped from the stack; the box operation is performed.

  An object reference to the resulting "boxed" value type is pushed onto the stack.

  A value type has two separate representations within the Common Language Infrastructure (CLI):

  A 'raw' form used when a value type is embedded within another object or on the stack.

  A 'boxed' form, where the data in the value type is wrapped (boxed) into an object so it can exist as an independent entity.

  The box instruction converts the 'raw' (unboxed) value type into an object reference (type O). This is accomplished by creating a new object and copying the data from the value type into the newly allocated object. is a metadata token indicating the type of the value type on the stack.

  is thrown if there is insufficient memory to satisfy the request.

  is thrown if the class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) is converted to native code, rather than at runtime.

  The following method overload can use the box opcode:

  ILGenerator.Emit(OpCode, Type)

  Converts a value type to an object reference (type O).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  38 < int32 >

  br

  Branches to a target instruction at the specified offset.

  No evaluation stack behaviors are performed by this operation.

  The br instruction unconditionally transfers control to a target instruction. The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the br opcode:

  ILGenerator.Emit(OpCode, Label)

  Unconditionally transfers control to a target instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2B < int8 >

  br.s

  Branches to a target instruction at the specified offset, short form.

  No evaluation stack behaviors are performed by this operation.

  The br.s instruction unconditionally transfers control to a target instruction. The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the br.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Unconditionally transfers control to a target instruction (short form).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  01

  break

  inform a debugger that a breakpoint has been reached.

  No evaluation stack behaviors are performed by this operation.

  The break instruction is for debugging support. It signals the CLI to inform the debugger that a break point has been tripped. It has no other effect on the interpreter state.

  The break instruction has the smallest possible instruction size enabling code patching with a break point and generating minimal disturbance to the surrounding code.

  The break instruction can trap to a debugger, do nothing, or raise a security exception. The exact behavior is implementation-defined.

  The following method overload can use the break opcode:

  ILGenerator.Emit(OpCode)

  Signals the Common Language Infrastructure (CLI) to inform the debugger that a break point has been tripped.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  39 < int32 >

  brfalse

  brnull

  brzero

  Branches to a target instruction at the specified offset if false.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack by a previous operation.

  is popped from the stack; if is false, branch to .

  The brfalse instruction (and its aliases brnull and brzero) transfers control to the specified target instruction if (of type int32, int64, object reference O, managed pointer &, transient pointer *, native int) is zero (false). If is non-zero (true) execution continues at the next instruction.

  The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the brfalse opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if is false, a null reference (Nothing in Visual Basic), or zero.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2C < int8 >

  brfalse.s

  brnull.s

  brzero.s

  Branches to a target instruction at the specified offset if false, short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack by a previous operation.

  is popped from the stack; if is false, branch to .

  The brfalse.s instruction (and its aliases brnull and brzero) transfers control to the specified target instruction if (of type int32, int64, object reference O, managed pointer &, transient pointer *, native int) is zero (false). If is non-zero (true) execution continues at the next instruction.

  The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the brfalse.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if is false, a null reference, or zero.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  3A < int32 >

  brtrue

  brinst

  Branch to a target instruction at the specified offset if non-zero (true).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack by a previous operation.

  is popped from the stack; if is true, branch to .

  The brtrue instruction transfers control to the specified target instruction if (type native int) is nonzero (true). If is zero (false) execution continues at the next instruction.

  If is an object reference (type O) then brinst (an alias for brtrue) transfers control if it represents an instance of an object (for example, if it is not the null object reference; see ).

  The target instruction is represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the brtrue opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction if is true, not null, or non-zero.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2D < int8 >

  brtrue.s

  brinst.s

  Branch to a target instruction at the specified offset if non-zero (true), short form.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack by a previous operation.

  is popped from the stack; if is true, branch to .

  The brtrue.s instruction transfers control to the specified target instruction if (type native int) is nonzero (true). If is zero (false) execution continues at the next instruction.

  If is an object reference (type O) then brinst (an alias for brtrue) transfers control if it represents an instance of an object (for example, if it is not the null object reference; see ).

  The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

  The following method overload can use the brtrue.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Transfers control to a target instruction (short form) if is true, not null, or non-zero.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  28 < T >

  call

  Call the method described by .

  The stack transitional behavior, in sequential order, is:

  Method arguments through are pushed onto the stack.

  Method arguments through are popped from the stack; the method call is performed with these arguments and control is transferred to the method referred to by the method descriptor. When complete, a return value is generated by the callee method and sent to the caller.

  The return value is pushed onto the stack.

  The call instruction calls the method indicated by the method descriptor passed with the instruction. The method descriptor is a metadata token that indicates the method to call and the number, type, and order of the arguments that have been placed on the stack to be passed to that method as well as the calling convention to be used. The call instruction can be immediately preceded by a tail () prefix instruction to specify that the current method state should be released before transferring control. If the call transfers control to a method of higher trust than the origin method, the stack frame is not released. Instead, the execution continues silently as if the tail had not been supplied. The metadata token carries sufficient information to determine whether the call is to a static method, an instance method, a virtual method, or a global function. In all of these cases the destination address is determined entirely from the method descriptor (contrast this with the instruction for calling virtual methods, where the destination address also depends upon the runtime type of the instance reference pushed before the ).

  The arguments are placed on the stack in left-to-right order. That is, the first argument is computed and placed on the stack, then the second argument, then the third, until all necessary arguments are atop the stack in descending order. There are three important special cases:

  1. Calls to an instance (or virtual) method must push that instance reference before any of the user-visible arguments. The instance reference must not be a null reference. The signature carried in the metadata does not contain an entry in the parameter list for the this pointer; instead, it uses a bit to indicate whether the method requires passing the this pointer.

  2. It is valid to call a virtual method using call (rather than callvirt); this indicates that the method is to be resolved using the class specified by method rather than as specified dynamically from the object being invoked.

  3. Note that a delegate's Invoke method can be called with either the call or callvirt instruction.

  may be thrown if system security does not grant the caller access to the called method. The security check may occur when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at run time.

  When calling methods of System.Object on value types, consider using the constrained prefix with the callvirt instruction instead of emitting a call instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the constrained prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a MethodImpl. These issues are described in more detail in the opcode.

  The following method overloads can use the call opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  ILGenerator.EmitCall(OpCode, MethodInfo, Type[])

  The method is provided for varargs calls. Use the method for normal calls.

  Calls the method indicated by the passed method descriptor.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  29 < T >

  calli

  Calls the method pointed to with arguments described by the calling convention.

  The stack transitional behavior, in sequential order, is:

  Method arguments through are pushed onto the stack.

  The method entry pointer is pushed onto the stack.

  Method arguments through and the method entry pointer are popped from the stack; the call to the method is performed. When complete, a return value is generated by the callee method and sent to the caller.

  The return value is pushed onto the stack.

  The calli instruction calls the method entry pointer with the arguments through . The types of these arguments are described by the specific calling convention (). The calli instruction may be immediately preceded by a tail prefix () to specify that the current method state should be released before transferring control. If the call would transfer control to a method of higher trust than the origin method the stack frame will not be released; instead, the execution will continue silently as if the tail had not been supplied.

  The method entry pointer is assumed to be a specific pointer to native code (of the target machine) that can be legitimately called with the arguments described by the calling convention (a metadata token for a stand-alone signature). Such a pointer can be created using the or instructions, or passed in from native code.

  The calling convention is not checked dynamically, so code that uses a calli instruction does not work correctly if the destination does not actually use the specified calling convention.

  The arguments are placed on the stack in left-to-right order. That is, the first argument is computed and placed on the stack, then the second argument, then the third, until all necessary arguments are atop the stack in descending order. The argument-building code sequence for an instance or virtual method must push that instance reference (which must not be a null reference) before any of the user-visible arguments.

  may be thrown if the system security does not grant the caller access to the called method. The security check can occur when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime.

  The following methods can be used to perform a calli instruction on the stack. Note that calli should be called through the below methods rather than using the class to place the instruction directly on the stack.

  ILGenerator.EmitCalli(Opcode, CallingConventions, Type, Type[], Type[]) for calls using a managed calling convention.

  ILGenerator.EmitCalli(Opcode, CallingConvention, Type, Type[]) for calls using an unmanaged calling convention.

  Calls the method indicated on the evaluation stack (as a pointer to an entry point) with arguments described by a calling convention.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  6F < T >

  callvirt

  Calls a specific method associated with .

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  Method arguments through are pushed onto the stack.

  Method arguments through and the object reference are popped from the stack; the method call is performed with these arguments and control is transferred to the method in referred to by the method metadata token. When complete, a return value is generated by the callee method and sent to the caller.

  The return value is pushed onto the stack.

  The callvirt instruction calls a late-bound method on an object. That is, the method is chosen based on the runtime type of rather than the compile-time class visible in the method pointer. Callvirt can be used to call both virtual and instance methods. The callvirt instruction may be immediately preceded by a tail () prefix to specify that the current stack frame should be released before transferring control. If the call would transfer control to a method of higher trust than the original method the stack frame will not be released.

  The method metadata token provides the name, class and signature of the method to call. The class associated with is the class of which it is an instance. If the class defines a non-static method that matches the indicated method name and signature, this method is called. Otherwise all classes in the base class chain of this class are checked in order. It is an error if no method is found.

  Callvirt pops the object and the associated arguments off the evaluation stack before calling the method. If the method has a return value, it is pushed on the stack upon method completion. On the callee side, the parameter is accessed as argument 0, as argument 1, and so on.

  The arguments are placed on the stack in left-to-right order. That is, the first argument is computed and placed on the stack, then the second argument, then the third, until all necessary arguments are atop the stack in descending order. The instance reference (always required for callvirt) must be pushed before any of the user-visible arguments. The signature (carried in the metadata token) need not contain an entry in the parameter list for the this pointer.

  Note that a virtual method can also be called using the instruction.

  is thrown if a non-static method with the indicated name and signature could not be found in the class associated with or any of its base classes. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime.

  is thrown if obj is null.

  is thrown if system security does not grant the caller access to the called method. The security check may occur when the CIL is converted to native code rather than at run time.

  When calling methods of System.Object on value types, consider using the constrained prefix with the callvirt instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the constrained prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a MethodImpl. These issues are described in more detail in the opcode.

  The following method overload can use the callvirt opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  ILGenerator.EmitCall(OpCode, MethodInfo, Type[])

  Calls a late-bound method on an object, pushing the return value onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(true)
  System.Reflection.Emit.OpCode

  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

  74 < T >

  castclass

  Casts an object to a new object of type .

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  The object reference is popped from the stack; the referenced object is cast as the specified .

  If successful, a new object reference is pushed onto the stack.

  The castclass instruction attempts to cast the object reference (type O) atop the stack to a specified class. The new class is specified by a metadata token indicating the desired class. If the class of the object on the top of the stack does not implement the new class (assuming the new class is an interface) and is not a derived class of the new class then an is thrown. If the object reference is a null reference, castclass succeeds and returns the new object as a null reference.

  is thrown if obj cannot be cast to class.

  is thrown if class cannot be found. This is typically detected when a Microsoft Intermediate Language (MSIL)instruction is converted to native code rather than at runtime.

  The following method overload can use the castclass opcode:

  ILGenerator.Emit(OpCode, Type)

  Attempts to cast an object passed by reference to the specified class.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 01

  ceq

  Pushes 1 if equals ; else pushes 0.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is compared to .

  If is equal to , 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

  The ceq instruction compares and . If is equal to , then 1 (of type int32) is pushed on the stack. Otherwise 0 (of type int32) is pushed on the stack.

  For floating-point number, ceq will return 0 if the numbers are unordered (either or both are NaN). The infinite values are equal to themselves.

  The following method overload can use the ceq opcode:

  ILGenerator.Emit(OpCode)

  Compares two values. If they are equal, the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 02

  cgt

  Pushes 1 if is greater than ; else pushes 0.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; cgt tests if is greater than .

  If is greater than , 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

  The cgt instruction compares and . If is strictly greater than , then an int32 value of 1 is pushed on the stack. Otherwise, an int32 value of 0 is pushed on the stack.

  For floating-point numbers, cgt returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN).

  The following method overload can use the cgt opcode:

  ILGenerator.Emit(OpCode)

  Compares two values. If the first value is greater than the second, the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 03

  cgt.un

  Pushes 1 if is greater than ; else pushes 0 (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; cgt.un tests if is greater than .

  If is greater than , 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

  An int32 value of 1 is pushed on the stack if any of the following is true :

  For floating-point numbers, is not ordered with respect to .

  For integer values, is strictly greater than when considered as unsigned numbers.

  Otherwise an int32 value of 0 is pushed on the stack.

  The following method overload can use the cgt.un opcode:

  ILGenerator.Emit(OpCode)

  Compares two unsigned or unordered values. If the first value is greater than the second, the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  C3

  ckfinite

  throw if value is not a finite number.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack..

  is popped from the stack and the ckfinite instruction is performed on it.

  is pushed back onto the stack if no exception is thrown.

  The ckfinite instruction throws if (a floating-point number) is either a "not a number" value (NaN) or a +- infinity value. Ckfinite leaves the value on the stack if no exception is thrown. Execution is unspecified if is not a floating-point number.

  is thrown if is not a 'normal' number.

  Note that a special exception or a derived class of may be more appropriate, passing the incorrect value to the exception handler.

  The following method overload can use the ckfinite opcode:

  ILGenerator.Emit(OpCode)

  Throws if value is not a finite number.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 04

  clt

  Pushes 1 if is less than ; else pushes 0.

  The stack transitional behavior, in sequential order, is: is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; clt tests if is less than .

  If is less than , 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

  The clt instruction compares and . If is strictly less than , then an int32 value of 1 is pushed on the stack. Otherwise, an int32 value of 0 is pushed on the stack.

  For floating-point numbers, clt returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN).

  The following method overload can use the clt opcode:

  ILGenerator.Emit(OpCode)

  Compares two values. If the first value is less than the second, the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 05

  clt.un

  Pushes 1 if is less than ; else pushes 0 (unsigned values).

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; clt.un tests if is less than .

  If is less than , 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

  The clt.un instruction compares and . An int32 value of 1 is pushed on the stack if any of the following is true:

  is strictly less than (as for clt).

  For floating-point numbers, is not ordered with respect to .

  For integer values, is strictly less than when considered as unsigned numbers.

  Otherwise, an int32 value of 0 is pushed on the stack.

  The following method overload can use the clt.un opcode:

  ILGenerator.Emit(OpCode)

  Compares the unsigned or unordered values and . If is less than , then the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

- Field
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 16 < T >

  constrained.

  Call a virtual method on a type constrained to be type T.

  The constrained prefix is permitted only on a callvirt instruction.

  The state of the MSIL stack at this point must be as follows:

  A managed pointer, , is pushed onto the stack. The type of must be a managed pointer (&) to . Note that this is different from the case of an unprefixed callvirt instruction, which expects a reference of .

  Method arguments through are pushed onto the stack, just as with an unprefixed callvirt instruction.

  The constrained prefix is designed to allow callvirt instructions to be made in a uniform way independent of whether is a value type or a reference type.

  When a callvirt instruction has been prefixed by constrained , the instruction is executed as follows:

  If is a reference type (as opposed to a value type) then is dereferenced and passed as the 'this' pointer to the callvirt of .

  If is a value type and implements then is passed unmodified as the 'this' pointer to a call instruction, for the implementation of by .

  If is a value type and does not implement then is dereferenced, boxed, and passed as the 'this' pointer to the callvirt instruction.

  This last case can occur only when was defined on , , or and not overridden by . In this case, the boxing causes a copy of the original object to be made. However, because none of the methods of , , and modify the state of the object, this fact cannot be detected.

  The constrained prefix supports IL generators that create generic code. Normally the callvirt instruction is not valid on value types. Instead it is required that IL compilers effectively perform the 'this' transformation outlined above at compile time, depending on the type of and the method being called. However, when is a generic type that is unknown at compile time, it is not possible to make this transformation at compile time.

  The constrained opcode allows IL compilers to make a call to a virtual function in a uniform way independent of whether is a value type or a reference type. Although it is intended for the case where is a generic type variable, the constrained prefix also works for nongeneric types and can reduce the complexity of generating virtual calls in languages that hide the distinction between value types and reference types.

  Using the constrained prefix also avoids potential versioning problems with value types. If the constrained prefix is not used, different IL must be emitted depending on whether or not a value type overrides a method of System.Object. For example, if a value type V overrides the Object.ToString() method, a call V.ToString() instruction is emitted; if it does not, a box instruction and a callvirt Object.ToString() instruction are emitted. A versioning problem can arise in the former case if the override is later removed, and in the latter case if an override is later added.

  The constrained prefix can also be used for invocation of interface methods on value types, because the value type method implementing the interface method can be changed using a MethodImpl. If the constrained prefix is not used, the compiler is forced to choose which of the value type's methods to bind to at compile time. Using the constrained prefix allows the MSIL to bind to the method that implements the interface method at run time, rather than at compile time.

  The following method overload can use the constrained opcode:

  ILGenerator.Emit(OpCode, Type)

  Constrains the type on which a virtual method call is made.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D3

  conv.i

  Convert to native int, pushing native int on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.i opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.i opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to native int.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  67

  conv.i1

  Convert to int8, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.i1 opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.i1 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to int8, then extends (pads) it to int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  68

  conv.i2

  Convert to int16, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.i2 opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.i2 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to int16, then extends (pads) it to int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  69

  conv.i4

  Convert to int32, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.i4 opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.i4 opcode:

  ILGenerator.Emit(OpCode)

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

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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:

  is pushed onto the stack.

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

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

  The conv.i8 opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

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

  ILGenerator.Emit(OpCode)

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

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D4

  conv.ovf.i

  Convert to a native int (on the stack as native int) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to signed native int, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8A

  conv.ovf.i.un

  Converts an unsigned value to a native int (on the stack as native int) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to signed native int, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B3

  conv.ovf.i1

  Convert to an int8 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i1 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i1 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to signed int8 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  82

  conv.ovf.i1.un

  Converts an unsigned value to an int8 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i1.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i1.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to signed int8 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B5

  conv.ovf.i2

  Convert to an int16 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i2 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i2 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to signed int16 and extending it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  83

  conv.ovf.i2.un

  Converts an unsigned value to an int16 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i2.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i2.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to signed int16 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B7

  conv.ovf.i4

  Convert to an int32 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i4 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i4 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to signed int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  84

  conv.ovf.i4.un

  Converts an unsigned value to an int32 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i4.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.i4.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to signed int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B9

  conv.ovf.i8

  Convert to an int64 (on the stack as int64) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i8 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

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

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to signed int64, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  85

  conv.ovf.i8.un

  Converts an unsigned value to an int64 (on the stack as int64) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.i8.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

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

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to signed int64, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D5

  conv.ovf.u

  Convert to an unsigned native int (on the stack as native int) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to unsigned native int, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8B

  conv.ovf.u.un

  Converts un unsigned value to an unsigned native int (on the stack as native int) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.uvf.u.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to unsigned native int, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B4

  conv.ovf.u1

  Convert to an unsigned int8 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u1 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u1 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to unsigned int8 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  86

  conv.ovf.u1.un

  Converts an unsigned value to an unsigned int8 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u1.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u1.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to unsigned int8 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B6

  conv.ovf.u2

  Convert to an unsigned int16 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u2 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u2 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to unsigned int16 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  87

  conv.ovf.u2.un

  Converts an unsigned value to an unsigned int16 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u2.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u2.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to unsigned int16 and extends it to int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  B8

  conv.ovf.u4

  Convert to an unsigned int32 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u4 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u4 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to unsigned int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  88

  conv.ovf.u4.un

  Converts an unsigned value to an unsigned int32 (on the stack as int32) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u4.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u4.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to unsigned int32, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  BA

  conv.ovf.u8

  Convert to an unsigned int64 (on the stack as int64) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u8 opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u8 opcode:

  ILGenerator.Emit(OpCode)

  Converts the signed value on top of the evaluation stack to unsigned int64, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  89

  conv.ovf.u8.un

  Converts an unsigned value to an unsigned int64 (on the stack as int64) and throw an exception on overflow.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and the conversion operation is attempted. If overflow occurs, an exception is thrown.

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

  The conv.ovf.u8.un opcode converts the on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. If the value is too large or too small to be represented by the target type, an exception is thrown.

  Conversions from floating-point numbers to integer values truncate the number toward zero. Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).

  is thrown if the result can not be represented in the result type.

  The following method overload can use the conv.ovf.u8.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned value on top of the evaluation stack to unsigned int64, throwing on overflow.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  76

  conv.r.un

  Convert unsigned integer to floating-point, pushing F on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.r.un opcode converts the 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 is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 returned is unspecified. The conv.r.un operation takes an integer off the stack, interprets it as unsigned, and replaces it with a floating-point number to represent the integer: either a float32, if this is wide enough to represent the integer without loss of precision, or else a float64.

  No exceptions are ever thrown when using this field.

  The following method overload can use the conv.r.un opcode:

  ILGenerator.Emit(OpCode)

  Converts the unsigned integer value on top of the evaluation stack to float32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  6B

  conv.r4

  Convert to float32, pushing F on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.r4 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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.

  The following method overload can use the conv.r4 opcode:

  ILGenerator.Emit(OpCode)

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

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  6C

  conv.r8

  Convert to float64, pushing F on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.r8 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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.

  The following method overload can use the conv.r8 opcode:

  ILGenerator.Emit(OpCode)

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

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  E0

  conv.u

  Convert to unsigned native int, pushing native int on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.u opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.u opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to unsigned native int, and extends it to native int.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D2

  conv.u1

  Convert to int8, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.u1 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.u1 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to unsigned int8, and extends it to int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D1

  conv.u2

  Convert to int16, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.u2 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.u2 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to unsigned int16, and extends it to int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  6D

  conv.u4

  Convert to unsigned int32, pushing int32 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.u4 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.u4 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to unsigned int32, and extends it to int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  6E

  conv.u8

  Convert to int64, pushing int64 on stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

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

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

  The conv.u8 opcode converts the 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 an float64 to an float32, precision can be lost. If is too large to fit in a float32 (F), positive infinity (if is positive) or negative infinity (if 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 and for equivalent instructions that will throw an exception when the result type can not properly represent the result value.

  The following method overload can use the conv.u8 opcode:

  ILGenerator.Emit(OpCode)

  Converts the value on top of the evaluation stack to unsigned int64, and extends it to int64.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 17

  cpblk

  Copy data from one memory block to another.

  The stack transitional behavior, in sequential order, is:

  The destination address is pushed onto the stack.

  The source address is pushed onto the stack.

  The number of bytes to copy is pushed onto the stack.

  The number of bytes, the source address, and the destination address are popped from the stack; the specified number of bytes are copied from the source address to the destination address.

  The cpblk instruction copies a number (type unsigned int32) of bytes from a source address (of type *, native int, or &) to a destination address (of type *, native int, or &). The behavior of cpblk is unspecified if the source and destination areas overlap.

  cpblk assumes that both the source and destination addressed are aligned to the natural size of the machine. The cpblk instruction can be immediately preceded by the unaligned.<prefix> instruction to indicate that either the source or the destination is unaligned.

  The operation of the cpblk instruction can be altered by an immediately preceding or prefix instruction.

  may be thrown if an invalid address is detected.

  The following method overload can use the cpblk opcode:

  ILGenerator.Emit(OpCode)

  Copies a specified number bytes from a source address to a destination address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  70 < T >

  cpobj

  Copies a value type from a source object to a destination object.

  The stack transitional behavior, in sequential order, is:

  The destination object reference is pushed onto the stack.

  The source object reference is pushed onto the stack.

  The two object references are popped from the stack; the value type at the address of the source object is copied to the address of the destination object.

  The behavior of cpobj is unspecified if the source and destination object references are not pointers to instances of the class represented by the class token (a typeref or typedef), or if does not represent a value type.

  may be thrown if an invalid address is detected.

  The following method overload can use the cpobj opcode:

  ILGenerator.Emit(OpCode, Type)

  Copies the value type located at the address of an object (type &, * or native int) to the address of the destination object (type &, * or native int).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  5B

  div

  Divides two values to return a quotient or floating-point result.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is divided by .

  The result is pushed onto the stack.

  = div value2 satisfies the following conditions:

  | | = | | / | |, and:

  sign() = +, if sign() = sign(), or -, if sign() ~= sign()

  The div instruction computes the result and pushes it on the stack.

  Integer division truncates towards zero.

  Division of a finite number by zero produces the correctly signed infinite value.

  Dividing zero by zero or infinity by infinity produces the NaN (Not-A-Number) value. Any number divided by infinity will produce a zero value.

  Integral operations throw if the result cannot be represented in the result type. This can happen if is the maximum negative value, and is -1.

  Integral operations throw if is zero.

  Note that on Intel-based platforms an is thrown when computing (minint div -1). Floating-point operations never throw an exception (they produce NaNs or infinities instead).

  The following method overload can use the div opcode:

  ILGenerator.Emit(OpCode)

  Divides two values and pushes the result as a floating-point (type F) or quotient (type int32) onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  5C

  div.un

  Divides two values, unsigned, returning a quotient.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is divided by .

  The result is pushed onto the stack.

  The div.un instruction computes divided by , both taken as unsigned integers, and pushes the on the stack.

  The following method overload can use the div.un opcode:

  ILGenerator.Emit(OpCode)

  Divides two unsigned integer values and pushes the result (int32) onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  25

  dup

  Duplicates the value on the top of the stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped off of the stack for duplication.

  is pushed back onto the stack.

  A duplicate value is pushed onto the stack.

  The dup instruction duplicates the top element of the stack, and leaves two identical values atop it.

  The following method overload can use the dup opcode:

  ILGenerator.Emit(OpCode)

  Copies the current topmost value on the evaluation stack, and then pushes the copy onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 11

  endfilter

  End filter clause of SEH exception handling.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack; endfilter is executed and control is transferred to the exception handler.

  (which must be of type int32 and is one of a specific set of values) is returned from the filter clause. It should be one of:

  exception_continue_search ( = 0) to continue searching for an exception handler

  exception_execute_handler ( = 1) to start the second phase of exception handling where finally blocks are run until the handler associated with this filter clause is located. Upon discovery, the handler is executed.

  Other integer values will produce unspecified results.

  The entry point of a filter, as shown in the method's exception table, must be the first instruction in the filter's code block. The endfilter instruction must be the last instruction in the filter's code block (hence there can only be one endfilter for any single filter block). After executing the endfilter instruction, control logically flows back to the CLI exception handling mechanism.

  Control cannot be transferred into a filter block except through the exception mechanism. Control cannot be transferred out of a filter block except through the use of a throw instruction or by executing the final endfilter instruction. You cannot embed a try block within a filter block. If an exception is thrown inside the filter block, it is intercepted and a value of 0 (exception_continue_search) is returned.

  The following method overload can use the endfilter opcode:

  ILGenerator.Emit(OpCode)

  Transfers control from the filter clause of an exception back to the Common Language Infrastructure (CLI) exception handler.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DC

  endfinally

  endfault

  Ends the finally or fault clause of an exception block.

  There are no stack transition behaviors for this instruction.

  Endfinally and endfault signal the end of the finally or fault clause so that stack unwinding can continue until the exception handler is invoked. The endfinally or endfault instruction transfers control back to the CLI exception mechanism. The mechanism then searches for the next finally clause in the chain if the protected block was exited with a leave instruction. If the protected block was exited with an exception, the CLI will search for the next finally or fault, or enter the exception handler chosen during the first pass of exception handling.

  An endfinally instruction might only appear lexically within a finally block. Unlike the endfilter instruction, there is no requirement that the block end with an endfinally instruction, and there can be as many endfinally instructions within the block as required. These same restrictions apply to the endfault instruction and the fault block.

  Control cannot be transferred into a finally (or fault) block except through the exception mechanism. Control cannot be transferred out of a finally (or fault) block except through the use of a throw instruction or executing the endfinally (or endfault) instruction. In particular, you cannot "fall out" of a finally (or fault) block or to execute a or instruction within a finally (or fault) block.

  Note that the endfault and endfinally instructions are aliases - they correspond to the same opcode.

  The following method overload can use the endfinally (endfault) opcode, as well as the ILGenerator method .

  ILGenerator.Emit(OpCode)

  ILGenerator.EndExceptionBlock()

  Transfers control from the fault or finally clause of an exception block back to the Common Language Infrastructure (CLI) exception handler.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 18

  initblk

  Set each location in a block of memory to a given value.

  The stack transitional behavior, in sequential order, is:

  A starting address is pushed onto the stack.

  An initialization value is pushed onto the stack.

  The number of bytes to initialize is pushed onto the stack.

  The number of bytes, the initialization value, and the starting address are popped from the stack, and the initialization is performed as per their values.

  The initblk instruction sets the number (unsigned int32) of bytes starting at the specified address (of type native int, &, or *) to the initialization value (of type unsigned int8). initblk assumes that the starting address is aligned to the natural size of the machine.

  The operation of the initblk instructions can be altered by an immediately preceding or prefix instruction.

  may be thrown if an invalid address is detected.

  The following method overload can use the initblk opcode:

  ILGenerator.Emit(OpCode)

  Initializes a specified block of memory at a specific address to a given size and initial value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 15 < T >

  initobj

  Initializes a value type.

  The stack transitional behavior, in sequential order, is:

  The address of the value type to initialize is pushed onto the stack.

  The address is popped from the stack; the value type at the specified address is initialized as type .

  The initobj instruction initializes each field of the value type specified by the pushed address (of type native int, &, or *) to a null reference or a 0 of the appropriate primitive type. After this method is called, the instance is ready for a constructor method to be called. If is a reference type, this instruction has the same effect as ldnull followed by stind.ref.

  Unlike , initobj does not call the constructor method. Initobj is intended for initializing value types, while newobj is used to allocate and initialize objects.

  The following method overload can use the initobj opcode:

  ILGenerator.Emit(OpCode, Type)

  Initializes each field of the value type at a specified address to a null reference or a 0 of the appropriate primitive type.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  75 < T >

  isinst

  Tests if an object reference is an instance of , returning either a null reference or an instance of that class or interface.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  The object reference is popped from the stack and tested to see if it is an instance of the class passed in .

  The result (either an object reference or a null reference) is pushed onto the stack.

  is a metadata token indicating the desired class. If the class of the object on the top of the stack implements (if is an interface) or is a derived class of (if is a regular class) then it is cast to type and the result is pushed on the stack, exactly as though had been called. Otherwise, a null reference is pushed on the stack. If the object reference itself is a null reference, then isinst likewise returns a null reference.

  is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime.

  The following method overload can use the isinst opcode:

  ILGenerator.Emit(OpCode, Type)

  Tests whether an object reference (type O) is an instance of a particular class.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  27 < T >

  jmp

  Exit current method and jump to specified method.

  There are no stack transition behaviors for this instruction.

  The jmp (jump) instruction transfers control to the method specified by , which is a metadata token for a method reference. The current arguments are transferred to the destination method.

  The evaluation stack must be empty when this instruction is executed. The calling convention, number and type of arguments at the destination address must match that of the current method.

  The jmp instruction cannot be used to transferred control out of a try, filter, catch, or finally block.

  The following method overload can use the jmp opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  Exits current method and jumps to specified method.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 09 < unsigned int16 >

  ldarg

  Load argument at onto stack.

  The stack transitional behavior, in sequential order, is:

  The argument value at is pushed onto the stack.

  The ldarg instruction pushes the argument indexed at , where arguments are indexed from 0 onwards, onto the evaluation stack. The ldarg instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  For procedures that take a variable-length argument list, the ldarg instruction can be used only for the initial fixed arguments, not those in the variable part of the signature (see the instruction for more details).

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg opcode:

  ILGenerator.Emit(OpCode, short)

  Loads an argument (referenced by a specified index value) onto the stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  02

  ldarg.0

  Load argument 0 onto stack

  The stack transitional behavior, in sequential order, is:

  The argument value at index 0 is pushed onto the stack.

  The ldarg.0 instruction is an efficient encoding for loading the argument value at index 0.

  The ldarg.0 instruction pushes the argument indexed at 0 onto the evaluation stack. The ldarg.0 instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg.0 opcode:

  ILGenerator.Emit(OpCode)

  Loads the argument at index 0 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  03

  ldarg.1

  Load argument 1 onto stack.

  The stack transitional behavior, in sequential order, is:

  The argument value at index 1 is pushed onto the stack.

  The ldarg.1 instruction is an efficient encoding for loading the argument value at index 1.

  The ldarg.1 instruction pushes the argument indexed at 1 onto the evaluation stack. The ldarg.1 instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg.1 opcode:

  ILGenerator.Emit(OpCode)

  Loads the argument at index 1 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  04

  ldarg.2

  Load argument 2 onto stack.

  The stack transitional behavior, in sequential order, is:

  The argument value at index 2 is pushed onto the stack.

  The ldarg.2 instruction is an efficient encoding for loading the argument value at index 2.

  The ldarg.2 instruction pushes the argument indexed at 2 onto the evaluation stack. The ldarg.2 instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg.2 opcode:

  ILGenerator.Emit(OpCode)

  Loads the argument at index 2 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  05

  ldarg.3

  Load argument 3 onto stack.

  The stack transitional behavior, in sequential order, is:

  The argument value at index 3 is pushed onto the stack.

  The ldarg.3 instruction is an efficient encoding for loading the argument value at index 3.

  The ldarg.3 instruction pushes the argument indexed at 3 onto the evaluation stack. The ldarg.3 instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg.3 opcode:

  ILGenerator.Emit(OpCode)

  Loads the argument at index 3 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0E < unsigned int8 >

  ldarg.s

  Load argument at onto stack, short form.

  The stack transitional behavior, in sequential order, is:

  The argument value at is pushed onto the stack.

  The ldarg.s instruction is an efficient encoding for loading arguments indexed from 4 through 255.

  The ldarg.s instruction pushes the argument indexed at , where arguments are indexed from 0 onwards, onto the evaluation stack. The ldarg.s instruction can be used to load a value type or a primitive value onto the stack by copying it from an incoming argument. The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

  For procedures that take a variable-length argument list, the ldarg.s instruction can be used only for the initial fixed arguments, not those in the variable part of the signature (see the instruction for more details).

  Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldarg.s opcode:

  ILGenerator.Emit(OpCode, byte)

  Loads the argument (referenced by a specified short form index) onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 0A < unsigned int16 >

  ldarga

  Fetch the address of argument indexed by .

  The stack transitional behavior, in sequential order, is:

  The address of the argument indexed by is pushed onto the stack.

  The ldarga instruction fetches the address (of type *) of the argument indexed by , where arguments are indexed from 0 onwards. The address is always aligned to a natural boundary on the target machine.

  For procedures that take a variable-length argument list, the ldarga instruction can be used only for the initial fixed arguments, not those in the variable part of the signature.

  ldarga is used for by-ref parameter passing. For other cases, and should be used.

  The following method overload can use the ldarga opcode:

  ILGenerator.Emit(OpCode, short)

  Load an argument address onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0F < unsigned int8 >

  ldarga.s

  Fetch the address of argument indexed by , short form.

  The stack transitional behavior, in sequential order, is:

  The address of the argument indexed by is pushed onto the stack.

  ldarga.s (the short form of ldarga) should be used for argument numbers 0 through 255, and is a more efficient encoding.

  The ldarga.s instruction fetches the address (of type *) of the argument indexed by , where arguments are indexed from 0 onwards. The address is always aligned to a natural boundary on the target machine.

  For procedures that take a variable-length argument list, the ldarga.s instruction can be used only for the initial fixed arguments, not those in the variable part of the signature.

  ldarga.s is used for by-ref parameter passing. For other cases, and should be used.

  The following method overload can use the ldarga.s opcode:

  ILGenerator.Emit(OpCode, byte)

  Load an argument address, in short form, onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  20 < int32 >

  ldc.i4

  Pushes the value onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value is pushed onto the stack.

  Note that there are special short (and hence more efficient) encodings for the integers -128 through 127, and especially short encodings for -1 through 8. All short encodings push 4 byte integers on the stack. Longer encodings are used for 8 byte integers and 4 and 8 byte floating-point numbers, as well as 4-byte values that do not fit in the short forms. There are three ways to push an 8 byte integer constant onto the stack

  1. Use the instruction for constants that must be expressed in more than 32 bits.

  2. Use the instruction followed by a for constants that require 9 to 32 bits.

  3. Use a short form instruction followed by a for constants that can be expressed in 8 or fewer bits.

  The following method overload can use the ldc.i4 opcode:

  ILGenerator.Emit(OpCode, int)

  Pushes a supplied value of type int32 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  16

  ldc.i4.0

  Pushes 0 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 0 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.0 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 0 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  17

  ldc.i4.1

  Pushes 1 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 1 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.1 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 1 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  18

  ldc.i4.2

  Pushes 2 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 2 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.2 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 2 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  19

  ldc.i4.3

  Pushes 3 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 3 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.3 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 3 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1A

  ldc.i4.4

  Pushes 4 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 4 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.4 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 4 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1B

  ldc.i4.5

  Pushes 5 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 5 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.5 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 5 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1C

  ldc.i4.6

  Pushes 6 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 6 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.6 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 6 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1D

  ldc.i4.7

  Pushes 7 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 7 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.7 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 7 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1E

  ldc.i4.8

  Pushes 8 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value 8 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.8 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of 8 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  15

  ldc.i4.m1

  Pushes -1 onto the stack.

  The stack transitional behavior, in sequential order, is:

  The value -1 is pushed onto the stack.

  This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack.

  The following method overload can use the ldc.i4.m1 opcode:

  ILGenerator.Emit(OpCode)

  Pushes the integer value of -1 onto the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  1F < int8 >

  ldc.i4.s

  Pushes onto the stack as int32, short form.

  The stack transitional behavior, in sequential order, is:

  The value is pushed onto the stack.

  ldc.i4.s is a more efficient encoding for pushing the integers from -128 to 127 onto the evaluation stack.

  The following method overload can use the ldc.i4.s opcode:

  ILGenerator.Emit(OpCode, byte)

  Pushes the supplied int8 value onto the evaluation stack as an int32, short form.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  21 < int64 >

  ldc.i8

  Pushes onto the stack as int64.

  The stack transitional behavior, in sequential order, is:

  The value is pushed onto the stack.

  This encoding pushes an int64 value onto the stack.

  The following method overload can use the ldc.i8 opcode:

  ILGenerator.Emit(OpCode, long)

  Pushes a supplied value of type int64 onto the evaluation stack as an int64.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  22 < float32 >

  ldc.r4

  Pushes onto the stack as F.

  The stack transitional behavior, in sequential order, is:

  The value is pushed onto the stack.

  This encoding pushes a float32 value onto the stack.

  The following method overload can use the ldc.r4 opcode:

  ILGenerator.Emit(OpCode, single)

  Pushes a supplied value of type float32 onto the evaluation stack as type F (float).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  23 < float64 >

  ldc.r8

  Pushes onto the stack as F.

  The stack transitional behavior, in sequential order, is:

  The value is pushed onto the stack.

  This encoding pushes a float64 value onto the stack.

  The following method overload can use the ldc.r8 opcode:

  ILGenerator.Emit(OpCode, double)

  Pushes a supplied value of type float64 onto the evaluation stack as type F (float).

- Field
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A3 < T >

  ldelem

  Loads the element at onto the top of the stack as type .

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects, and hence represented by a value of type O.

  The type of the return value is specified by the token in the instruction.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the upper bound of .

  The following method overload can use the ldelem opcode:

  ILGenerator.Emit(OpCode, Type)

  Loads the element at a specified array index onto the top of the evaluation stack as the type specified in the instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  97

  ldelem.i

  Loads the element with type native int at onto the top of the stack as a native int.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.i instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.i is native int.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.i opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type native int at a specified array index onto the top of the evaluation stack as a native int.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  90

  ldelem.i1

  Loads the element with type int8 at onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.i1 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.i1 is int8.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.i1 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type int8 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  92

  ldelem.i2

  Loads the element with type int16 at onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.i2 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.i2 is int16.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.i2 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type int16 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  94

  ldelem.i4

  Loads the element with type int32 at onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.i4 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.i4 is int32.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.i4 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type int32 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  96

  ldelem.i8

  Loads the element with type int64 at onto the top of the stack as an int64.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.i8 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.i8 is int64.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.i8 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type int64 at a specified array index onto the top of the evaluation stack as an int64.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  98

  ldelem.r4

  Loads the element with type float32 at onto the top of the stack as a type F.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.r4 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.r4 is float32.

  Floating-point values are converted to type F when loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.r4 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type float32 at a specified array index onto the top of the evaluation stack as type F (float).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  99

  ldelem.r8

  Loads the element with type float64 at onto the top of the stack as type F.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.r8 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.r8 is float64.

  Floating-point values are converted to type F when loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.r8 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type float64 at a specified array index onto the top of the evaluation stack as type F (float).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9A

  ldelem.ref

  Loads the element with an object reference at onto the top of the stack as type O.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.ref instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.ref is type O (object reference).

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.ref opcode:

  ILGenerator.Emit(OpCode)

  Loads the element containing an object reference at a specified array index onto the top of the evaluation stack as type O (object reference).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  91

  ldelem.u1

  Loads the element with type unsigned int8 at onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.u1 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.u1 is int8.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.u1 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type unsigned int8 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  93

  ldelem.u2

  Loads the element with type unsigned int16 at index onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.u2 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.u2 is int16.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.u2 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type unsigned int16 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  95

  ldelem.u4

  Loads the element with type unsigned int32 at index onto the top of the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the value stored at position in is looked up.

  The value is pushed onto the stack.

  The ldelem.u4 instruction loads the value of the element with index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O.

  The return value for ldelem.u4 is int32.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if array does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelem.u4 opcode:

  ILGenerator.Emit(OpCode)

  Loads the element with type unsigned int32 at a specified array index onto the top of the evaluation stack as an int32.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8F < T >

  ldelema

  Loads the address of the array element at onto the top of the evaluation stack as type & (managed pointer).

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  An index value is pushed onto the stack.

  and are popped from the stack; the address stored at position in is looked up.

  The address is pushed onto the stack.

  The ldelema is used to retrieve the address of an object at a particular index in an array of objects (of type ). The ldelema instruction loads the address of the value at index (type native int) in the zero-based one-dimensional array and places it on the top of the stack. Arrays are objects and hence represented by a value of type O. The value must be of type passed with the instruction.

  The return value for ldelema is a managed pointer (type &).

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.

  is thrown if is a null reference.

  is thrown if does not hold elements of the required type.

  is thrown if is negative, or larger than the bound of .

  The following method overload can use the ldelema opcode:

  ILGenerator.Emit(OpCode, Type)

  Loads the address of the array element at a specified array index onto the top of the evaluation stack as type & (managed pointer).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7B < T >

  ldfld

  Pushes the value of a field in a specified object onto the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference (or pointer) is pushed onto the stack.

  The object reference (or pointer) is popped from the stack; the value of the specified field in the object is found.

  The value stored in the field is pushed onto the stack.

  The ldfld instruction pushes the value of a field located in an object onto the stack. The object must be on the stack as an object reference (type O), a managed pointer (type &), an unmanaged pointer (type native int), a transient pointer (type *), or an instance of a value type. The use of an unmanaged pointer is not permitted in verifiable code. The object's field is specified by a metadata token that must refer to a field member. The return type is the same as the one associated with the field. The field may be either an instance field (in which case the object must not be a null reference) or a static field.

  The ldfld instruction can be preceded by either or both of the and prefixes.

  is thrown if the object is null and the field is not static.

  is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time.

  The following method overload can use the ldfld opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Finds the value of a field in the object whose reference is currently on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7C < T >

  ldflda

  Pushes the address of in a specified object onto the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference (or pointer) is pushed onto the stack.

  The object reference (or pointer) is popped from the stack; the address of the specified field in the object is found.

  The address of the specified field is pushed onto the stack.

  The ldflda instruction pushes the address of a field located in an object onto the stack. The object must be on the stack as an object reference (type O), a managed pointer (type &), an unmanaged pointer (type native int), a transient pointer (type *), or an instance of a value type. The use of an unmanaged pointer is not permitted in verifiable code. The object's field is specified by a metadata token that must refer to a field member.

  The value returned by ldflda is a managed pointer (type &) unless the object is pushed onto the stack as an unmanaged pointer, in which case the return address is also an unmanaged pointer (type native int).

  The ldflda instruction can be preceded by either or both of the and prefixes.

  is thrown if the object is not within the application domain from which it is being accessed. The address of a field that is not inside the accessing application domain cannot be loaded.

  is thrown if the object is null and the field is not static.

  is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time.

  The following method overload can use the ldflda opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Finds the address of a field in the object whose reference is currently on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 06 < T >

  ldftn

  Pushes a pointer to a method referenced by on the stack.

  The stack transitional behavior, in sequential order, is:

  The unmanaged pointer to a specific method is pushed onto the stack.

  The specific method () can be called using the instruction if it references a managed method (or a stub that transitions from managed to unmanaged code).

  The value returned points to native code using the calling convention specified by the metadata token. Thus, a method pointer can be easily passed to unmanaged native code (specifically, as a callback routine).

  The following method overload can use the ldftn opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  Pushes an unmanaged pointer (type native int) to the native code implementing a specific method onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4D

  ldind.i

  Loads the native int value at address onto the stack as a native int.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.i instruction indirectly loads a native int value from the specified address (of type native int, &, or *) onto the stack as a native int.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.i opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type native int as a native int onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  46

  ldind.i1

  Loads the int8 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack..

  The ldind.i1 instruction indirectly loads an int8 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.i1 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type int8 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  48

  ldind.i2

  Loads the int16 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.i2 instruction indirectly loads an int16 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.i2 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type int16 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4A

  ldind.i4

  Loads the int32 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.i4 instruction indirectly loads an int32 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.i4 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type int32 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4C

  ldind.i8

  Loads the int64 value at address onto the stack as an int64.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.i8 instruction indirectly loads an int64 value from the specified address (of type native int, &, or *) onto the stack as an int64.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.i8 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type int64 as an int64 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4E

  ldind.r4

  Loads the float32 value at address onto the stack as a type F.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.r4 instruction indirectly loads a float32 value from the specified address (of type native int, &, or *) onto the stack as a type F.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.r4 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type float32 as a type F (float) onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4F

  ldind.r8

  Loads the float64 value at address onto the stack as a type F.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.r8 instruction indirectly loads a float64 value from the specified address (of type native int, &, or *) onto the stack as a float64.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.r8 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type float64 as a type F (float) onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  50

  ldind.ref

  Loads the object reference at address onto the stack as a type O

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the object reference located at the address is fetched.

  The fetched reference is pushed onto the stack.

  The ldind.ref instruction indirectly loads the object reference the specified address (of type native int, &, or *) onto the stack as type O.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.ref opcode:

  ILGenerator.Emit(OpCode)

  Loads an object reference as a type O (object reference) onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  47

  ldind.u1

  Loads the unsigned int8 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.u1 instruction indirectly loads an unsigned int8 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.u1 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type unsigned int8 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  49

  ldind.u2

  Loads the unsigned int16 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.u2 instruction indirectly loads an unsigned int16 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.u2 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type unsigned int16 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  4B

  ldind.u4

  Loads the unsigned int32 value at address onto the stack as an int32.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  The address is popped from the stack; the value located at the address is fetched.

  The fetched value is pushed onto the stack.

  The ldind.u4 instruction indirectly loads an unsigned int32 value from the specified address (of type native int, &, or *) onto the stack as an int32.

  All of the ldind instructions are shortcuts for a instruction that specifies the corresponding built-in value class.

  Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

  Correctly-formed Microsoft Intermediate Language (MSIL) ensures that the ldind instructions are used in a manner consistent with the type of the pointer.

  The address initially pushed onto the stack must be aligned to the natural size of objects on the machine or a can occur (see the prefix instruction for preventative measures). The results of all MSIL instructions that return addresses (for example, and ) are safely aligned. For datatypes larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering might not run on all platforms.

  can be thrown if an invalid address is detected.

  The following method overload can use the ldind.u4 opcode:

  ILGenerator.Emit(OpCode)

  Loads a value of type unsigned int32 as an int32 onto the evaluation stack indirectly.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8E

  ldlen

  Pushes the length (of type natural unsigned int) of an array on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array is pushed onto the stack.

  The array reference is popped from the stack and the length is computed.

  The length is pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The length is returned as a natural unsigned int.

  is thrown if the array reference is a null reference.

  The following method overload can use the ldlen opcode:

  ILGenerator.Emit(OpCode)

  Pushes the number of elements of a zero-based, one-dimensional array onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 0C < unsigned int16 >

  ldloc

  Loads the local variable at index onto stack.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the specified index is pushed onto the stack.

  The ldloc instruction pushes the contents of the local variable number at the passed index onto the evaluation stack, where the local variables are numbered 0 onwards. Local variables are initialized to 0 before entering the method only if the initialize flag on the method is true. There are 65,535 (2^16-1) local variables possible (0-65,534). Index 65,535 is not valid since likely implementations will use a 2-byte integer to track both a local's index, along with the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method.

  The ldloc.0, ldloc.1, ldloc.2, and ldloc.3 instructions provide an efficient encoding for accessing the first four local variables.

  The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overloads can use the ldloc opcode:

  ILGenerator.Emit(OpCode, LocalBuilder)

  ILGenerator.Emit(OpCode, short)

  Loads the local variable at a specific index onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  06

  ldloc.0

  Loads the local variable at index 0 onto the evaluation stack.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the index 0 is pushed onto the stack.

  ldloc.0 is an especially efficient encoding for , allowing access to the local variable at index 0.

  The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldloc.0 opcode:

  ILGenerator.Emit(OpCode)

  Loads the local variable at index 0 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  07

  ldloc.1

  Loads the local variable at index 1 onto the evaluation stack.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the index 1 is pushed onto the stack.

  ldloc.1 is an especially efficient encoding for , allowing access to the local variable at index 1.

  The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldloc.1 opcode:

  ILGenerator.Emit(OpCode)

  Loads the local variable at index 1 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  08

  ldloc.2

  Loads the local variable at index 2 onto the evaluation stack.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the index 2 is pushed onto the stack.

  ldloc.2 is an especially efficient encoding for , allowing access to the local variable at index 2.

  The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldloc.2 opcode:

  ILGenerator.Emit(OpCode)

  Loads the local variable at index 2 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  09

  ldloc.3

  Loads the local variable at index 3 onto the evaluation stack.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the index 3 is pushed onto the stack.

  ldloc.3 is an especially efficient encoding for , allowing access to the local variable at index 3.

  The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overload can use the ldloc.3 opcode:

  ILGenerator.Emit(OpCode)

  Loads the local variable at index 3 onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  11 < unsigned int8 >

  ldloc.s

  Loads the local variable at index onto stack, short form.

  The stack transitional behavior, in sequential order, is:

  The local variable value at the specified index is pushed onto the stack.

  The ldloc.s instruction pushes the contents of the local variable number at the passed index onto the evaluation stack, where the local variables are numbered 0 onwards. Local variables are initialized to 0 before entering the method if the initialize flag on the method is true. There are 256 (2^8) local variables possible (0-255) in the short form, which is a more efficient encoding than ldloc.

  The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

  The following method overloads can use the ldloc.s opcode:

  ILGenerator.Emit(OpCode, LocalBuilder)

  ILGenerator.Emit(OpCode, byte)

  Loads the local variable at a specific index onto the evaluation stack, short form.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE OD < unsigned int16 >

  ldloca

  Loads the address of the local variable at onto the evaluation stack.

  The stack transitional behavior, in sequential order, is:

  The address stored in the local variable at the specified index is pushed onto the stack.

  The ldloca instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a transient pointer (type *).

  The following method overload can use the ldloca opcode:

  ILGenerator.Emit(OpCode, short)

  Loads the address of the local variable at a specific index onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  12 < unsigned int8 >

  ldloca.s

  Loads the address of the local variable at onto the evaluation stack, short form.

  The stack transitional behavior, in sequential order, is:

  The address stored in the local variable at the specified index is pushed onto the stack.

  The ldloca.s instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a transient pointer (type *).

  The ldloca.s instruction provides an efficient encoding for use with the local variables 0 through 255.

  The following method overload can use the ldloca.s opcode:

  ILGenerator.Emit(OpCode, byte)

  Loads the address of the local variable at a specific index onto the evaluation stack, short form.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  14

  ldnull

  push a null reference onto the stack

  The stack transitional behavior, in sequential order, is:

  A null object reference is pushed onto the stack.

  ldnull pushes a null reference (type O) on the stack. This is used to initialize locations before they are populated with data, or when they become deprecated.

  ldnull provides a null reference that is size-independent.

  The following method overload can use the ldnull opcode:

  ILGenerator.Emit(OpCode)

  Pushes a null reference (type O) onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  71 < T >

  ldobj

  Copy instance of value type to the stack.

  The stack transitional behavior, in sequential order, is:

  The address of a value type object is pushed onto the stack.

  The address is popped from the stack and the instance at that particular address is looked up.

  The value of the object stored at that address is pushed onto the stack.

  The ldobj instruction is used to pass a value type as a parameter.

  The ldobj instruction copies the value pointed to by (of type &, *, or native int) to the top of the stack. The number of bytes copied depends on the size of the class (as specified by the parameter). The parameter is a metadata token representing the value type.

  The operation of the ldobj instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime.

  The following method overload can use the ldobj opcode:

  ILGenerator.Emit(OpCode, Type)

  Copies the value type object pointed to by an address to the top of the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7E < T >

  ldsfld

  Push the value of on the stack.

  The stack transitional behavior, in sequential order, is:

  The value of the specific field is pushed onto the stack.

  The ldsfld instruction pushes the value of a static (shared among all instances of a class) field on the stack. The return type is that associated with the passed metadata token .

  The ldsfld instruction can have a prefix.

  The following method overload can use the ldsfld opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Pushes the value of a static field onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7F < T >

  ldsflda

  Push the address of on the stack

  The stack transitional behavior, in sequential order, is:

  The address of a specific field is pushed onto the stack.

  The ldsflda instruction pushes the address of a static (shared among all instances of a class) field on the stack. The address may be represented as a transient pointer (type *) if the metadata token refers to a type whose memory is managed. Otherwise, it corresponds to an unmanaged pointer (type native int). Note that may be a static global with an assigned relative virtual address (the offset of the field from the base address at which its containing PE file is loaded into memory) where the memory is unmanaged.

  The ldsflda instruction can have a prefix.

  is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at runtime.

  The following method overload can use the ldsflda opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Pushes the address of a static field onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  72 < T >

  ldstr

  Pushes a string object for the metadata string token .

  The stack transitional behavior, in sequential order, is:

  An object reference to a string is pushed onto the stack.

  The ldstr instruction pushes an object reference (type O) to a new string object representing the specific string literal stored in the metadata. The ldstr instruction allocates the requisite amount of memory and performs any format conversion required to convert the string literal from the form used in the file to the string format required at runtime.

  The Common Language Infrastructure (CLI) guarantees that the result of two ldstr instructions referring to two metadata tokens that have the same sequence of characters return precisely the same string object (a process known as "string interning").

  The following method overload can use the ldstr opcode:

  ILGenerator.Emit(OpCode, string)

  Pushes a new object reference to a string literal stored in the metadata.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D0 < T >

  ldtoken

  Converts a metadata token to its runtime representation.

  The stack transitional behavior, in sequential order, is:

  The passed token is converted to a RuntimeHandle and pushed onto the stack.

  The ldtoken instruction pushes a RuntimeHandle for the specified metadata token. A RuntimeHandle can be a fieldref/fielddef, a methodref/methoddef, or a typeref/typedef.

  The value pushed on the stack can be used in calls to Reflection methods in the system class library.

  For information on runtime handles, see the following classes: , , and .

  The following method overloads can use the ldtoken opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  ILGenerator.Emit(OpCode, FieldInfo)

  ILGenerator.Emit(OpCode, Type)

  Converts a metadata token to its runtime representation, pushing it onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 07 < T >

  ldvirtftn

  Pushes the pointer to an object's virtual method on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  The object reference is popped from the stack and the address of the entry point to the method (as specified by the metadata token ) is looked up.

  The pointer to is pushed onto the stack.

  The resulting unmanaged pointer pushed onto the stack by the ldvirtftn instruction can be called using the instruction if it references a managed method (or a stub that transitions from managed to unmanaged code).

  The unmanaged pointer points to native code using the calling convention specified by in the metadata token . As a result, the method pointer can be passed to unmanaged native code (for example, as a callback routine) if that routine expects the corresponding calling convention.

  The following method overload can use the ldvirtftn opcode:

  ILGenerator.Emit(OpCode, MethodInfo)

  Pushes an unmanaged pointer (type native int) to the native code implementing a particular virtual method associated with a specified object onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DD < int32 >

  leave

  Exits a protected region of code.

  There is no stack transition behavior specified for this instruction.

  The leave instruction unconditionally transfers control to the specific target instruction, represented as a 4-byte signed offset from the beginning of the instruction following the current instruction.

  The leave instruction is similar to the br instruction, but it can be used to exit a try, filter, or catch block whereas the ordinary branch instructions can only be used in such a block to transfer control within it. The leave instruction empties the evaluation stack and ensures that the appropriate surrounding finally blocks are executed.

  You cannot use a leave instruction to exit a finally block. To ease code generation for exception handlers it is valid from within a catch block to use a leave instruction to transfer control to any instruction within the associated try block.

  If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

  The following method overloads can use the leave opcode:

  ILGenerator.Emit(OpCode, Label)

  Exits a protected region of code, unconditionally transferring control to a specific target instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DE < int8 >

  leave.s

  Exit a protected region of code, short form.

  There is no stack transition behavior specified for this instruction.

  The leave.s instruction unconditionally transfers control to the passed target instruction, represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

  The leave.s instruction is similar to the br instruction, but it can be used to exit a try, filter, or catch block whereas the ordinary branch instructions can only be used in such a block to transfer control within it. The leave.s instruction empties the evaluation stack and ensures that the appropriate surrounding finally blocks are executed.

  You cannot use a leave.s instruction to exit a finally block. To ease code generation for exception handlers it is valid from within a catch block to use a leave.s instruction to transfer control to any instruction within the associated try block.

  If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

  The following method overload can use the leave.s opcode:

  ILGenerator.Emit(OpCode, Label)

  Exits a protected region of code, unconditionally transferring control to a target instruction (short form).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 0F

  localloc

  Allocate space from the local heap.

  The stack transitional behavior, in sequential order, is:

  The number of bytes to be allocated is pushed onto the stack.

  The number of bytes is popped from the stack; an amount of memory corresponding to the size is allocated from the local heap.

  A pointer to the first byte of the allocated memory is pushed onto the stack.

  The localloc instruction allocates (type natural unsigned int) bytes from the local dynamic memory pool and returns the address (a transient pointer, type *) of the first allocated byte. The block of memory returned is initialized to 0 only if the initialize flag on the method is true. When the current method executes a , the local memory pool is made available for reuse.

  The resulting address is aligned so that any primitive data type can be stored there using the stind instructions (such as ) and loaded using the ldind instructions (such as ).

  The localloc instruction cannot occur within a filter, catch, finally, or fault block.

  is thrown if there is insufficient memory to service the request.

  The following method overload can use the localloc opcode:

  ILGenerator.Emit(OpCode)

  Allocates a certain number of bytes from the local dynamic memory pool and pushes the address (a transient pointer, type *) of the first allocated byte onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  C6 < T >

  mkrefany

  Pushes a typed reference of type onto the stack.

  The stack transitional behavior, in sequential order, is:

  A pointer to piece of data is pushed onto the stack.

  The pointer is popped and converted to a typed reference of type .

  The typed reference is pushed onto the stack.

  The mkrefany instruction supports the passing of dynamically typed references. The pointer must be of type &, *, or native int, and hold the valid address of a piece of data. is the class token describing the type of the data referenced by the pointer. Mkrefany pushes a typed reference on the stack, providing an opaque descriptor of the pointer and the type .

  The only valid operation permitted upon a typed reference is to pass it to a method that requires a typed reference as a parameter. The callee can then use the and instructions to retrieve the type (class) and the address respectively.

  is thrown if cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime.

  The following method overload can use the mkrefany opcode:

  ILGenerator.Emit(OpCode, Type)

  Pushes a typed reference to an instance of a specific type onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  5A

  mul

  Multiplies two values on the stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is multiplied by .

  The result is pushed onto the stack.

  The mul instruction multiplies by and pushes the result on the stack. Integer operations silently truncate the upper bits on overflow.

  See for an integer-specific multiply operation with overflow handling.

  For floating-point types, 0 * infinity = NaN.

  The following method overload can use the mul opcode:

  ILGenerator.Emit(OpCode)

  Multiplies two values and pushes the result on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D8

  mul.ovf

  Multiplies two integer values on the stack with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is multiplied by , with an overflow check.

  The result is pushed onto the stack.

  The mul.ovf instruction multiplies integer by integer and pushes the result on the stack. An exception is thrown if the result will not fit in the result type.

  is thrown if the result can not be represented in the result type.

  The following method overload can use the mul.ovf opcode:

  ILGenerator.Emit(OpCode)

  Multiplies two integer values, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  D9

  mul.ovf.un

  Multiplies two unsigned values on the stack with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is multiplied by , with an overflow check.

  The result is pushed onto the stack.

  The mul.ovf.un instruction multiplies unsigned integer by unsigned integer and pushes the result on the stack. An exception is thrown if the result will not fit in the result type.

  is thrown if the result can not be represented in the result type.

  The following method overload can use the mul.ovf.un opcode:

  ILGenerator.Emit(OpCode)

  Multiplies two unsigned integer values, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  65

  neg

  Negates the value currently on top of the stack.

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  A value is popped from the stack and negated.

  The result is pushed onto the stack.

  The neg instruction negates value and pushes the result on top of the stack. The return type is the same as the operand type.

  Negation of integral values is standard two's complement negation. In particular, negating the most negative number (which does not have a positive counterpart) yields the most negative number. To detect this overflow use the instruction instead (that is, subtract from 0).

  Negating a floating-point number cannot overflow, and negating NaN returns NaN.

  The following method overload can use the neg opcode:

  ILGenerator.Emit(OpCode)

  Negates a value and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  8D < T >

  newarr

  Creates a new array with elements of type .

  The stack transitional behavior, in sequential order, is:

  The number of elements in the array is pushed onto the stack.

  The number of elements is popped from the stack and the array is created.

  An object reference to the new array is pushed onto the stack.

  The newarr instruction pushes an object reference (type O) to a new zero-based, one-dimensional array whose elements are of type (a metadata token describing the type). The number of elements in the new array should be specified as a native int. Valid array indexes range from zero to the maximum number of elements minus one.

  The elements of an array can be any type, including value types.

  Zero-based, one-dimensional arrays of numbers are created using a metadata token referencing the appropriate value type (, and so on). Elements of the array are initialized to 0 of the appropriate type.

  Nonzero-based one-dimensional arrays and multidimensional arrays are created using rather than newarr. More commonly, they are created using the methods of the class in the .NET Framework.

  is thrown if there is insufficient memory to satisfy the request.

  is thrown if is less than 0.

  The following method overload can use the newarr opcode:

  ILGenerator.Emit(OpCode, Type)

  Pushes an object reference to a new zero-based, one-dimensional array whose elements are of a specific type onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  73 < T >

  newobj

  Allocates an uninitialized object or value type and calls the constructor method .

  The stack transitional behavior, in sequential order, is:

  Arguments through are pushed on the stack in sequence.

  Arguments through are popped from the stack and passed to for object creation.

  A reference to the new object is pushed onto the stack.

  The newobj instruction creates a new object or a new instance of a value type. is a metadata token (a methodref or methoddef that must be marked as a constructor) that indicates the name, class and signature of the constructor to call.

  The newobj instruction allocates a new instance of the class associated with and initializes all the fields in the new instance to 0 (of the proper type) or null references as appropriate. It then calls the constructor with the given arguments along with the newly created instance. After the constructor has been called, the now initialized object reference (type O) is pushed on the stack.

  From the constructor's point of view, the uninitialized object is argument 0 and the other arguments passed to newobj follow in order.

  All zero-based, one-dimensional arrays are created using , not newobj. On the other hand, all other arrays (more than one dimension, or one-dimensional but not zero-based) are created using newobj.

  Value types are not usually created using newobj. They are usually allocated either as arguments or local variables, using newarr (for zero-based, one-dimensional arrays), or as fields of objects. Once allocated, they are initialized using . However, the newobj instruction can be used to create a new instance of a value type on the stack, that can then be passed as an argument, stored in a local, and so on.

  is thrown if there is insufficient memory to satisfy the request.

  is thrown if a constructor method with the indicated name, class and signature could not be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime.

  The following method overload can use the newobj opcode:

  ILGenerator.Emit(OpCode, ConstructorInfo)

  Creates a new object or a new instance of a value type, pushing an object reference (type O) onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  00

  nop

  Performs an operation without behavior.

  There is no stack transitional behavior defined for this instruction.

  The nop operation does nothing. It is intended to fill in space if opcodes are patched.

  The following method overload can use the nop opcode:

  ILGenerator.Emit(OpCode)

  Fills space if opcodes are patched. No meaningful operation is performed although a processing cycle can be consumed.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  66

  not

  Computes the bitwise complement of a value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is popped from the stack and its bitwise complement computed.

  The result is pushed onto the stack.

  The not instruction computes the bitwise complement of an integer value and pushes the result onto the stack. The return type is the same as the operand type.

  The following method overload can use the not opcode:

  ILGenerator.Emit(OpCode)

  Computes the bitwise complement of the integer value on top of the stack and pushes the result onto the evaluation stack as the same type.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  60

  or

  Computes the bitwise OR of two integer values, returns an integer.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack and their bitwise OR computed.

  The result is pushed onto the stack.

  The or instruction computes the bitwise OR of two values atop the stack, pushing the result onto the stack.

  Or is an integer-specific operation.

  The following method overload can use the or opcode:

  ILGenerator.Emit(OpCode)

  Compute the bitwise complement of the two integer values on top of the stack and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  26

  pop

  Pops the top value from the stack.

  The stack transitional behavior, in sequential order, is:

  The top value is popped from the stack.

  The pop instruction removes the top element from the stack.

  The following method overload can use the pop opcode:

  ILGenerator.Emit(OpCode)

  Removes the value currently on top of the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode To be added

  This is a reserved instruction.

- Field
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 1E

  readonly.

  Specify that the subsequent array address operation performs no type check at run time, and that it returns a managed pointer with restricted mutability.

  This prefix can only appear immediately preceding the ldelema instruction and calls to the special Address method on arrays. Its effect on the subsequent operation is twofold:

  At run time, no type check operation is performed. Note that there is normally an implicit type check for the ldelema and stelem instructions when used on reference type arrays. There is never a run-time type check for value classes, so readonly is a no-op in that case.

  The verifier treats the result of the address-of operation as a managed pointer with restricted mutability.

  The pointer is said to have restricted mutability because the defining type controls whether the value can be mutated. For value classes that expose no public fields or methods that update the value in place, the pointer is read-only (hence the name of the prefix). In particular, the classes representing primitive types (for example, System.Int32) do not expose mutators and thus are read-only.

  A managed pointer restricted in this fashion can be used only in the following ways:

  As the parameter for the ldfld, ldflda, stfld, call, or constrained callvirt instructions.

  As the parameter to the ldobj instruction or to one of the ldind instructions.

  As the parameter to the cpobj instruction.

  All other operations disallowed, including the stobj, initobj, or mkrefany operations, or any of the stind instructions.

  The purpose of the readonly prefix is to avoid a type check when fetching an element from an array in generic code. For example, the expression arr[i].m(), where the element type of the array arr is a generic type that has been constrained to have an interface with method m, might compile to the following MSIL.

  `ldloc arr ldloc i readonly. ldelema !0 // Loads the pointer to the object. … // Load the arguments to the call. constrained. !0 callvirt m`

  Without the readonly prefix, the ldelema instruction would perform a type check in the case where !0 was a reference type. Not only is this type check inefficient, but it is semantically incorrect. The type check for ldelema is an exact match, which is too strong. If the array held subclasses of type !0, the code above would fail the type check.

  The address of the array element is fetched, instead of the element itself, in order to have a handle for arr[i] that works for both value types and reference types, and thus can be passed to the constrained callvirt instruction.

  In general it would be unsafe to skip the run-time check if the array held elements of a reference type. To be safe, it is necessary to ensure that no modifications to the array are made through this pointer. The verifier rules ensure this. The restricted managed pointer can be passed as the object of instance method calls, so it is not strictly speaking read-only for value types, but there is no type safety problem for value types.

  The following method overload can use the readonly opcode:

  ILGenerator.Emit(OpCode)

  Specifies that the subsequent array address operation performs no type check at run time, and that it returns a managed pointer whose mutability is restricted.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 1D

  refanytype

  Pushes the type token stored in a typed reference.

  The stack transitional behavior, in sequential order, is:

  A value type reference is pushed onto the stack.

  The typed reference is popped from the stack and its corresponding type token retrieved.

  The type token is pushed onto the stack.

  A typed reference contains a type token and an address to an object instance.

  The refanytype instruction retrieves the type token embedded in the typed reference. See the instruction for information on creating typed references.

  The following method overload can use the refanytype opcode:

  ILGenerator.Emit(OpCode)

  Retrieves the type token embedded in a typed reference.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  C2 < T >

  refanyval

  Pushes the address stored in a typed reference.

  The stack transitional behavior, in sequential order, is:

  A value type reference is pushed onto the stack.

  The typed reference is popped from the stack and the corresponding address retrieved.

  The address is pushed onto the stack.

  A typed reference contains a type token and an address to an object instance.

  The refanyval instruction retrieves the address embedded in the a typed reference. The type embedded in the typed reference supplied on the stack must match the type specified by (a metadata token, either a typedef or a typeref). See the instruction for related content.

  is thrown if is not identical to the type stored in the type reference (in this case, is the class supplied to the instruction that constructed said typed reference).

  is thrown if cannot be found.

  The following method overload can use the refanyval opcode:

  ILGenerator.Emit(OpCode, Type)

  Retrieves the address (type &) embedded in a typed reference.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  5D

  rem

  Pushes the remainder of dividing by onto the stack.

  ReplaceThisText

  The stack transitional behavior, in sequential order, is:

  A is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack and the remainder of div computed.

  The result is pushed onto the stack.

  = rem satisfies the following conditions:

  = - × ( div ), and:

  0 = | | < | |, sign() = sign(), where div is the division instruction that truncates towards zero.

  If is zero or is infinity the result is NaN. If is infinity, the result is (negated for -infinity).

  Integral operations throw if is zero.

  Note that on the Intel-based platforms an is thrown when computing (minint rem -1).

  The following method overload can use the rem opcode:

  ILGenerator.Emit(OpCode)

  Divides two values and pushes the remainder onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  5E

  rem.un

  Pushes the remainder of dividing unsigned by unsigned onto the stack.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack and the remainder of div computed.

  The result is pushed onto the stack.

  = rem.un satisfies the following conditions:

  = - x( div.un ), and:

  0 = < , where div.un is the unsigned division instruction.

  The rem.un instruction computes and pushes it on the stack. Rem.un treats its arguments as unsigned integers, while treats them as signed integers.

  Rem.un is unspecified for floating-point numbers.

  Integral operations throw if is zero.

  The following method overload can use the rem.un opcode:

  ILGenerator.Emit(OpCode)

  Divides two unsigned values and pushes the remainder onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  2A

  ret

  Returns from method, possibly returning a value.

  The stack transitional behavior, in sequential order, is:

  The return value is popped from the callee evaluation stack.

  The return value obtained in step 1 is pushed onto the caller evaluation stack.

  If the return value is not present on the callee evaluation stack, no value is returned (no stack transition behaviors for either the callee or caller method).

  The type of the return value, if any, of the current method determines the type of value to be fetched from the top of the stack and copied onto the stack of the method that called the current method. The evaluation stack for the current method must be empty except for the value to be returned.

  The ret instruction cannot be used to transfer control out of a try, filter, catch, or finally block. From within a try or catch, use the instruction with a destination of a ret instruction that is outside all enclosing exception blocks. Because the filter and finally blocks are logically part of exception handling and not the method in which their code is embedded, correctly generated Microsoft Intermediate Language (MSIL) instructions do not perform a method return from within a filter or finally.

  The following method overload can use the ret opcode:

  ILGenerator.Emit(OpCode)

  Returns from the current method, pushing a return value (if present) from the callee's evaluation stack onto the caller's evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 1A

  rethrow

  Rethrows the current exception

  No stack transition behavior is defined for this instruction.

  The instruction is only permitted within the body of a catch handler. It throws the same exception that was caught by this handler.

  The following method overload can use the rethrow opcode:

  ILGenerator.Emit(OpCode)

  Rethrows the current exception.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  62

  shl

  Shifts an integer to the left (shifting in zeros).

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  The amount of bits to be shifted is pushed onto the stack.

  The number of bits to be shifted and the value are popped from the stack; the value is shifted left by the specified number of bits.

  The result is pushed onto the stack.

  The shl instruction shifts the value (type int32, int64 or native int) left by the specified number of bits. The number of bits is a value of type int32 or native int. The return value is unspecified if the number of bits to be shifted is greater than or equal to the width (in bits) of the supplied value.

  Shl inserts a zero bit in the lowest position on each shift.

  The following method overload can use the shl opcode:

  ILGenerator.Emit(OpCode)

  Shifts an integer value to the left (in zeroes) by a specified number of bits, pushing the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  63

  shr

  Shifts an integer to the right (shifting in sign).

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  The amount of bits to be shifted is pushed onto the stack.

  The number of bits to be shifted and the value are popped from the stack; the value is shifted right by the specified number of bits.

  The result is pushed onto the stack.

  The shr.un instruction shifts the value (type int32, int64 or native int) right by the specified number of bits. The number of bits is a value of type int32 or native int. The return value is unspecified if the number of bits to be shifted is greater than or equal to the width (in bits) of the supplied value.

  Shr replicates the high order bit on each shift, preserving the sign of the original value in the .

  The following method overload can use the shr opcode:

  ILGenerator.Emit(OpCode)

  Shifts an integer value (in sign) to the right by a specified number of bits, pushing the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  64

  shr.un

  Shifts an integer to the right (shifting in zeroes).

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  The amount of bits to be shifted is pushed onto the stack.

  The number of bits to be shifted and the value are popped from the stack; the value is shifted right by the specified number of bits.

  The result is pushed onto the stack.

  The shr.un instruction shifts the value (type int32, int64 or native int) right by the specified number of bits. The number of bits is a value of type int32, int64 or native int. The return value is unspecified if the number of bits to be shifted is greater than or equal to the width (in bits) of the supplied value.

  Shr.un inserts a zero bit in the highest position on each shift.

  The following method overload can use the shr.un opcode:

  ILGenerator.Emit(OpCode)

  Shifts an unsigned integer value (in zeroes) to the right by a specified number of bits, pushing the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 1C < T >

  sizeof

  Push the size, in bytes, of a value type as an unsigned int32.

  The stack transitional behavior, in sequential order, is:

  The size (in bytes) of the supplied value type () is pushed onto the stack.

  must be a metadata token (a typeref or typedef) that specifies a value type, reference type, or generic type parameter.

  For a reference type, the size returned is the size of a reference value of the corresponding type (4 bytes on 32-bit systems), not the size of the data stored in objects referred to by the reference value. A generic type parameter can be used only in the body of the type or method that defines it. When that type or method is instantiated, the generic type parameter is replaced by a value type or reference type.

  The following method overload can use the sizeof opcode:

  ILGenerator.Emit(OpCode, Type)

  Pushes the size, in bytes, of a supplied value type onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 0B < unsigned int16 >

  starg

  Pops the top value from the stack and stores it in argument slot .

  The stack transitional behavior, in sequential order, is:

  The value currently on top of the stack is popped and placed in argument slot .

  The starg instruction pops a value from the stack and places it in argument slot . The type of the value must match the type of the argument, as specified in the current method's signature.

  For procedures that take a variable argument list, the starg instruction can be used only for the initial fixed arguments, not those in the variable part of the signature.

  Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the starg opcode:

  ILGenerator.Emit(OpCode, short)

  Stores the value on top of the evaluation stack in the argument slot at a specified index.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  10 < unsigned int8 >

  starg.s

  Pops the top value from the stack and stores it in argument slot , short form.

  The stack transitional behavior, in sequential order, is:

  The value currently on top of the stack is popped and placed in argument slot .

  The starg.s instruction pops a value from the stack and places it in argument slot . The type of the value must match the type of the argument, as specified in the current method's signature.

  The starg.s instruction provides an efficient encoding for use with the first 256 arguments.

  For procedures that take a variable argument list, the starg.s instruction can be used only for the initial fixed arguments, not those in the variable part of the signature.

  Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the starg.s opcode:

  ILGenerator.Emit(OpCode, byte)

  Stores the value on top of the evaluation stack in the argument slot at a specified index, short form.

- Field
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A4 < T >

  stelem

  Replaces the array element at the supplied index with a value of type on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  An index value, , to an element in is pushed onto the stack.

  A value of the type specified in the instruction is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem instruction replaces the value of the element at the supplied zero-based index in the one-dimensional array with the value. The value has the type specified by the token in the instruction.

  Arrays are objects, and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem opcode:

  ILGenerator.Emit(OpCode, Type)

  Replaces the array element at a given index with the value on the evaluation stack, whose type is specified in the instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9B

  stelem.i

  Replaces an array element at the supplied index with the native int value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.i instruction replaces the value of the element in the one-dimensional array with the native int value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.i opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the native int value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9C

  stelem.i1

  Replaces an array element at the supplied index with the int8 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.i1 instruction replaces the value of the element in the one-dimensional array with the int8 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.i1 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the int8 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9D

  stelem.i2

  Replaces an array element at the supplied index with the int16 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.i2 instruction replaces the value of the element in the one-dimensional array with the int16 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.i2 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the int16 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9E

  stelem.i4

  Replaces an array element at the supplied index with the int32 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.i4 instruction replaces the value of the element in the one-dimensional array with the int32 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.i4 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the int32 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  9F

  stelem.i8

  Replaces an array element at the supplied index with the int64 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.i8 instruction replaces the value of the element in the one-dimensional array with the int64 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.i8 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the int64 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A0

  stelem.r4

  Replaces an array element at the supplied index with the float32 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.r4 instruction replaces the value of the element in the one-dimensional array with the float32 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.r4 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the float32 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A1

  stelem.r8

  Replaces an array element at the supplied index with the float64 value on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.r8 instruction replaces the value of the element in the one-dimensional array with the float64 value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.r8 opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the float64 value on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A2

  stelem.ref

  Replaces an array element at the supplied index with the ref value (type O) on the stack.

  The stack transitional behavior, in sequential order, is:

  An object reference to an array, , is pushed onto the stack.

  A valid index to an element in is pushed onto the stack.

  A value is pushed onto the stack.

  The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.

  The stelem.ref instruction replaces the value of the element at the supplied index in the one-dimensional array with the ref (type O) value pushed onto the stack.

  Arrays are objects and hence represented by a value of type O. The index is type native int.

  Note that stelem.ref implicitly casts the supplied value to the element type of before assigning the value to the array element. This cast can fail, even for verified code. Thus the stelem.ref instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method.

  is thrown if is a null reference.

  is thrown if is negative, or larger than the bound of .

  is thrown if does not hold elements of the required type.

  The following method overload can use the stelem.ref opcode:

  ILGenerator.Emit(OpCode)

  Replaces the array element at a given index with the object ref value (type O) on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7D < T >

  stfld

  Replaces the value of of the object with a new value.

  The stack transitional behavior, in sequential order, is:

  An object reference or pointer is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the object reference/pointer are popped from the stack; the value of in the object is replaced with the supplied value.

  The stfld instruction replaces the value of a field of an object (type O) or via a pointer (type native int, &, or *) with a given value. is a metadata token that refers to a field member reference. The stfld instruction can have a prefix of either or both of and .

  is thrown if the object reference or pointer is a null reference and the field isn't static.

  is thrown if is not found in the metadata. This is typically checked when the Microsoft Intermediate Language (MSIL) instruction is converted to native code, not at runtime.

  The following method overload can use the stfld opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Replaces the value stored in the field of an object reference or pointer with a new value.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DF

  stind.i

  Stores a native int value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.i instruction stores a native int value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.i instruction be used in a manner consistent with the type of the pointer. The operation of the stind.i instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.i opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type native int at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  52

  stind.i1

  Stores an int8 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.i1 instruction stores an int8 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.i1 instruction be used in a manner consistent with the type of the pointer. The operation of the stind.i1 instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.i1 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type int8 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  53

  stind.i2

  Stores an int16 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.i2 instruction stores an int16 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.2i instruction be used in a manner consistent with the type of the pointer. The operation of the stind.i2 instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.i2 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type int16 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  54

  stind.i4

  Stores an int32 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.i4 instruction stores an int32 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.i4 instruction be used in a manner consistent with the type of the pointer. The operation of the stind.i4 instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.i4 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type int32 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  55

  stind.i8

  Stores an int64 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.i8 instruction stores an int64 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.i8 instruction be used in a manner consistent with the type of the pointer. The operation of the stind.i instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.i8 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type int64 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  56

  stind.r4

  Stores a float32 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.r4 instruction stores a float32 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.r4 instruction be used in a manner consistent with the type of the pointer. The operation of the stind.r4 instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.r4 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type float32 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  57

  stind.r8

  Stores a float64 value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.r8 instruction stores a float64 value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.r8 instruction be used in a manner consistent with the type of the pointer. The operation of the stind.r8 instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.r8 opcode:

  ILGenerator.Emit(OpCode)

  Stores a value of type float64 at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  51

  stind.ref

  Stores an object reference (type O) value at a given address.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value is pushed onto the stack.

  The value and the address are popped from the stack; the value is stored at the address.

  The stind.ref instruction stores an object reference value at the supplied address (type native int, *, or &).

  Type safe operation requires that the stind.ref instruction be used in a manner consistent with the type of the pointer. The operation of the stind.ref instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if is not naturally aligned for the argument type implied by the instruction suffix.

  The following method overload can use the stind.ref opcode:

  ILGenerator.Emit(OpCode)

  Stores a object reference value at a supplied address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 0E < unsigned int16 >

  stloc

  Pops a value from the stack and stores it in local variable .

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in local variable .

  The stloc instruction pops the top value off the evaluation stack and moves it into local variable number , where local variables are numbered 0 onwards. The type of the value must match the type of the local variable as specified in the current method's local signature.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  Correct Microsoft Intermediate Language (MSIL) instructions require that be a valid local index. For the stloc instruction, must lie in the range 0 to 65534 inclusive (specifically, 65535 is not valid). The reason for excluding 65535 is pragmatic: likely implementations will use a 2-byte integer to track both a local's index, as well as the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method.

  The following method overloads can use the stloc opcode:

  ILGenerator.Emit(OpCode, LocalBuilder)

  ILGenerator.Emit(OpCode, short)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at a specified index.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0A

  stloc.0

  Pops a value from the stack into local variable 0.

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in the local variable indexed by 0.

  The stloc.0 instruction pops the top value off the evaluation stack and moves it into the local variable indexed by 0. The type of the value must match the type of the local variable as specified in the current method's local signature.

  stloc.0 is an especially efficient encoding for storing values in local variable 0.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the stloc.0 opcode:

  ILGenerator.Emit(OpCode)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at index 0.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0B

  stloc.1

  Pops a value from the stack into local variable 1.

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in the local variable indexed by 1.

  The stloc.1 instruction pops the top value off the evaluation stack and moves it into the local variable indexed by 1. The type of the value must match the type of the local variable as specified in the current method's local signature.

  stloc.1 is an especially efficient encoding for storing values in local variable 1.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the stloc.1 opcode:

  ILGenerator.Emit(OpCode)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at index 1.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0C

  stloc.2

  Pops a value from the stack into local variable 2

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in the local variable indexed by 2.

  The stloc.2 instruction pops the top value off the evaluation stack and moves it into the local variable indexed by 2. The type of the value must match the type of the local variable as specified in the current method's local signature.

  stloc.2 is an especially efficient encoding for storing values in local variable 2.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the stloc.2 opcode:

  ILGenerator.Emit(OpCode)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at index 2.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  0D

  stloc.3

  Pops a value from the stack into local variable 3

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in the local variable indexed by 3.

  The stloc.3 instruction pops the top value off the evaluation stack and moves it into the local variable indexed by 3. The type of the value must match the type of the local variable as specified in the current method's local signature.

  stloc.3 is an especially efficient encoding for storing values in local variable 3.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overload can use the stloc.3 opcode:

  ILGenerator.Emit(OpCode)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at index 3.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  13 < unsigned int8 >

  stloc.s

  Pops a value from the stack and stores it in local variable , short form.

  The stack transitional behavior, in sequential order, is:

  A value is popped off of the stack and placed in local variable .

  The stloc.s instruction pops the top value off the evaluation stack and moves it into local variable number , where local variables are numbered 0 onwards. The type of the value must match the type of the local variable as specified in the current method's local signature.

  The stloc.s instruction provides an efficient encoding for local variables 0 through 255.

  Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type F) to the size associated with the argument.

  The following method overloads can use the stloc.s opcode:

  ILGenerator.Emit(OpCode, LocalBuilder)

  ILGenerator.Emit(OpCode, byte)

  Pops the current value from the top of the evaluation stack and stores it in a the local variable list at (short form).

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  81 < T >

  stobj

  Stores a value of type from the stack into memory.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  A value type object of type is pushed onto the stack.

  The object and the address are popped from the stack; the value type object is stored at the address.

  The stobj instruction copies the value type object into the address specified by the address (a pointer of type native int, *, or &). The number of bytes copied depends on the size of the class represented by , a metadata token representing a value type.

  The operation of the stobj instruction can be altered by an immediately preceding or prefix instruction.

  is thrown if class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at run time.

  The following method overload can use the stobj opcode:

  ILGenerator.Emit(OpCode, Type)

  Copies a value of a specified type from the evaluation stack into a supplied memory address.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  80 < T >

  stsfld

  Replaces the value in with a supplied value.

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  A value is popped from the stack and stored in .

  The stsfld instruction replaces the value of a static field with a value from the stack. is a metadata token that must refer to a static field member.

  The stsfld instruction may be prefixed by .

  is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time.

  The following method overload can use the stsfld opcode:

  ILGenerator.Emit(OpCode, FieldInfo)

  Replaces the value of a static field with a value from the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  59

  sub

  Subtracts one value from another, returning a new numeric value.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is subtracted from .

  The result is pushed onto the stack.

  Overflow is not detected for integer operations (for proper overflow handling, see ).

  Integer subtraction wraps, rather than saturates. For example: assuming 8-bit integers, where is set to 0 and is set to 1, the "wrapped" result will be 255.

  Floating-point overflow returns +inf (PositiveInfinity) or -inf (NegativeInfinity).

  The following method overload can use the sub opcode:

  ILGenerator.Emit(OpCode)

  Subtracts one value from another and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DA

  sub.ovf

  Subtracts one integer value from another with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is subtracted from with a check for overflow.

  The result is pushed onto the stack.

  is thrown if the result can not be represented in the result type.

  This operation is performed on signed integers; for floating-point values, use .

  The following method overload can use the sub.ovf opcode:

  ILGenerator.Emit(OpCode)

  Subtracts one integer value from another, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  DB

  sub.ovf.un

  Subtracts one unsigned integer value from another with an overflow check.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack; is subtracted from with a check for overflow.

  The result is pushed onto the stack.

  is thrown if the result can not be represented in the result type.

  This operation is performed on signed integers; for floating-point values, use .

  The following method overload can use the sub.ovf.un opcode:

  ILGenerator.Emit(OpCode)

  Subtracts one unsigned integer value from another, performs an overflow check, and pushes the result onto the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  45 < unsigned int32 > < int32 >... < int32 >

  switch (, , ... )

  Jumps to one of values.

  The stack transitional behavior, in sequential order, is:

  A value is pushed onto the stack.

  The value is popped off the stack and execution is transferred to the instruction at the offset indexed by the value, where the value is less than .

  The switch instruction implements a jump table. The format of the instruction is an unsigned int32 representing the number of targets , followed by int32 values specifying jump targets. These targets are represented as offsets (positive or negative) from the beginning of the instruction following this switch instruction.

  The switch instruction pops a value off the stack and compares it, as an unsigned integer, to . If value is less than , execution is transferred to the target indexed by value, where targets are numbered from 0 (for example, a value of 0 takes the first target, a value of 1 takes the second target, and so on). If the value is greater than or equal to , execution continues at the next instruction (fall through).

  If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

  Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction. (Such transfers are severely restricted and must use the leave instruction instead).

  The following method overload can use the switch opcode. The argument is an array of Labels representing 32-bit offsets.

  ILGenerator.Emit(OpCode, Label[])

  Implements a jump table.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 14

  tail.

  Subsequent call terminates current methods

  There is no stack transition behavior defined for this instruction.

  The tail prefix instruction must immediately precede a , , or instruction. It indicates that the current method's stack frame should be removed before the call instruction is executed. It also implies that the value returned from the following call is also the value returned by the current method, and the call can therefore be converted into a cross-method jump.

  The stack must be empty except for the arguments being transferred by the following call. The instruction following the call instruction must be a ret. Thus the only valid code sequence is tail. call (or calli or callvirt). Correct Microsoft Intermediate Language (MSIL) instructions must not branch to the call instruction, but they may branch to the subsequent .

  The current frame cannot be discarded when control is transferred from untrusted code to trusted code, since this would jeopardize code identity security. The .NET Framework security checks can therefore cause the tail to be ignored, leaving a standard instruction. Similarly, in order to allow the exit of a synchronized region to occur after the call returns, the tail prefix is ignored when used to exit a method that is marked synchronized.

  The following method overload can use the tail opcode:

  ILGenerator.Emit(OpCode)

  Performs a postfixed method call instruction such that the current method's stack frame is removed before the actual call instruction is executed.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method can be used to find which MSIL opcodes are "short form", for use in optimized code.

  TakesSingleByteArgument returns true if the instance takes a single byte argument in the following cases:

  The opcode performs a branch instruction to a byte-sized address (for example, and ).

  The opcode pushes a byte value onto the stack (for example, ).

  The opcode references a variable or argument via the byte-sized "short form" (for example, and ).

  Otherwise, it returns false.

  The example below demonstrates the use of TakesSingleByteArgument by reflecting on to the OpCodes class and testing to see whether each OpCode field takes a single-byte argument.

  code reference: System.Reflection.Emit.OpCodes.TakesSingleByteArgument Example#1

  Returns true or false if the supplied opcode takes a single byte argument.

  True or false.

  An instance of an Opcode object.
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  7A

  throw

  Throws an exception.

  The stack transitional behavior, in sequential order, is:

  An object reference (to an exception) is pushed onto the stack.

  The object reference is popped from the stack and the exception thrown.

  The throw instruction throws the exception object (type O) currently on the stack.

  is thrown if the object reference is a null reference.

  The following method overload can use the throw opcode:

  ILGenerator.Emit(OpCode)

  Throws the exception object currently on the evaluation stack.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 12 < unsigned int8 >

  unaligned.

  Indicates that the subsequent pointer instruction may be unaligned.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  Unaligned specifies that the address (an unmanaged pointer, native int) on the stack might not be aligned to the natural size of the immediately following ldind, stind, ldfld, stfld, ldobj, stobj, initblk, or cpblk instruction. That is, for a instruction the alignment of the address may not be to a 4-byte boundary. For initblk and cpblk the default alignment is architecture dependent (4-byte on 32-bit CPUs, 8-byte on 64-bit CPUs). Code generators that do not restrict their output to a 32-bit word size must use unaligned if the alignment is not known at compile time to be 8-byte.

  The value of alignment must be 1, 2, or 4 and means that the generated code should assume that the address is byte, double-byte, or quad-byte aligned, respectively. Note that transient pointers (type *) are always aligned.

  While the alignment for a cpblk instruction would logically require two numbers (one for the source and one for the destination), there is no noticeable impact on performance if only the lower number is specified.

  The unaligned and volatile prefixes can be combined in either order. They must immediately precede a ldind, stind, ldfld, stfld, ldobj, stobj, initblk, or cpblk instruction. Only the prefix is allowed for the and instructions.

  The following method overloads can use the unaligned opcode:

  ILGenerator.Emit(OpCode, Label)

  ILGenerator.Emit(Opcode, Byte)

  Indicates that an address currently atop the evaluation stack might not be aligned to the natural size of the immediately following ldind, stind, ldfld, stfld, ldobj, stobj, initblk, or cpblk instruction.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  79 < T >

  unbox

  Extracts the value type data from , its boxed representation.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  The object reference is popped from the stack and unboxed to a value type pointer.

  The value type pointer is pushed onto the stack.

  A value type has two separate representations within the Common Language Infrastructure (CLI):

  A 'raw' form used when a value type is embedded within another object.

  A 'boxed' form, where the data in the value type is wrapped (boxed) into an object so it can exist as an independent entity.

  The unbox instruction converts the object reference (type O), the boxed representation of a value type, to a value type pointer (a managed pointer, type &), its unboxed form. The supplied value type () is a metadata token indicating the type of value type contained within the boxed object.

  Unlike , which is required to make a copy of a value type for use in the object, unbox is not required to copy the value type from the object. Typically it simply computes the address of the value type that is already present inside of the boxed object.

  is thrown if the object is not boxed as .

  is thrown if the object reference is a null reference.

  is thrown if the value type cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime.

  The following method overload can use the unbox opcode:

  ILGenerator.Emit(OpCode, Type)

  Converts the boxed representation of a value type to its unboxed form.

- Field
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  A5 < T >

  unbox.any

  Extract the data from , its boxed representation.

  The stack transitional behavior, in sequential order, is:

  An object reference is pushed onto the stack.

  The object reference is popped from the stack and unboxed to the type specified in the instruction.

  The resulting object reference or value type is pushed onto the stack.

  When applied to the boxed form of a value type, the unbox.any instruction extracts the value contained within (of type O), and is therefore equivalent to unbox followed by ldobj.

  When applied to a reference type, the unbox.any instruction has the same effect as castclass .

  If the operand is a generic type parameter, then the runtime behavior is determined by the type that is specified for that generic type parameter.

  is thrown if is not a boxed type.

  is thrown if is a null reference.

  The following method overload can use the unbox.any opcode:

  ILGenerator.Emit(OpCode, Type)

  Converts the boxed representation of a type specified in the instruction to its unboxed form.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  FE 13

  volatile.

  Indicates that the subsequent pointer reference is volatile.

  The stack transitional behavior, in sequential order, is:

  An address is pushed onto the stack.

  volatile. specifies that the address is a volatile address (that is, it can be referenced externally to the current thread of execution) and the results of reading that location cannot be cached or that multiple stores to that location cannot be suppressed. Marking an access as volatile affects only that single access; other accesses to the same location must be marked separately. Access to volatile locations need not be performed atomically.

  The and volatile prefixes can be combined in either order. They must immediately precede a ldind, stind, ldfld, stfld, ldobj, stobj, initblk, or cpblk instruction. Only the volatile prefix is allowed for the and instructions.

  The following method overload can use the volatile opcode:

  ILGenerator.Emit(OpCode)

  Specifies that an address currently atop the evaluation stack might be volatile, and the results of reading that location cannot be cached or that multiple stores to that location cannot be suppressed.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.OpCode

  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

  61

  xor

  Computes the bitwise XOR of two integer values and returns an integer.

  The stack transitional behavior, in sequential order, is:

  is pushed onto the stack.

  is pushed onto the stack.

  and are popped from the stack and their bitwise XOR computed.

  and are popped from the stack and their bitwise XOR computed.

  The xor instruction computes the bitwise XOR of the top two values on the stack and leaves the result on the stack.

  Xor is an integer-specific operation.

  The following method overload can use the xor opcode:

  ILGenerator.Emit(OpCode)

  Computes the bitwise XOR of the top two values on the evaluation stack, pushing the result onto the evaluation stack.