Copies the current topmost value on the evaluation stack, and then pushes the copy onto the evaluation stack.
The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:
25 |
dup |
Duplicates the value on the top of the stack. |
The stack transitional behavior, in sequential order, is:
[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]The dup instruction duplicates the top element of the stack, and leaves two identical values atop it.
The following ILGenerator.Emit(OpCode) method overload can use the dup opcode:
ILGenerator.Emit(OpCode)