OpCodes.Ldloca_S 字段

定义

将位于特定索引处的局部变量的地址加载到计算堆栈上(短格式)。Loads the address of the local variable at a specific index onto the evaluation stack, short form.

public: static initonly System::Reflection::Emit::OpCode Ldloca_S;
public static readonly System.Reflection.Emit.OpCode Ldloca_S;
 staticval mutable Ldloca_S : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldloca_S As OpCode 

字段值

注解

下表列出了指令的十六进制和 Microsoft 中间语言(MSIL)程序集格式以及简短的参考摘要: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 >12 < unsigned int8 > ldloca indexldloca.s index index 处的局部变量的地址加载到计算堆栈上(短格式)。Loads the address of the local variable at index onto the evaluation stack, short form.

堆栈转换行为顺序如下:The stack transitional behavior, in sequential order, is:

  1. 存储在本地变量中指定索引处的地址被推送到堆栈上。The address stored in the local variable at the specified index is pushed onto the stack.

@No__t-0 指令将传递的索引处的局部变量号的地址推送到堆栈上,其中局部变量从0开始编号。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. 在堆栈上推送的值已正确对齐,以便与 Ldind_IStind_I 之类的指令一起使用。The value pushed on the stack is already aligned correctly for use with instructions like Ldind_I and Stind_I. 结果为暂时性指针(类型 *)。The result is a transient pointer (type *).

@No__t-0 指令提供了一个有效的编码,可与局部变量0到255一起使用。The ldloca.s instruction provides an efficient encoding for use with the local variables 0 through 255.

以下 @no__t 0 方法重载可以使用 @no__t 操作码:The following Emit method overload can use the ldloca.s opcode:

  • ILGenerator (OpCode,byte)ILGenerator.Emit(OpCode, byte)

适用于