OpCodes.Ldloc_3 字段

定义

将索引 3 处的局部变量加载到计算堆栈上。Loads the local variable at index 3 onto the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Ldloc_3;
public static readonly System.Reflection.Emit.OpCode Ldloc_3;
 staticval mutable Ldloc_3 : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldloc_3 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
0909 ldloc.3ldloc.3 将索引 3 处的局部变量加载到计算堆栈上。Loads the local variable at index 3 onto the evaluation stack.

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

  1. 将索引为3的本地变量值推送到堆栈上。The local variable value at the index 3 is pushed onto the stack.

@no__t 是 Ldloc 的一个特别高效的编码,允许访问索引3处的局部变量。ldloc.3 is an especially efficient encoding for Ldloc, 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. 小于4个字节的局部变量将在加载到堆栈上时扩展为类型 int32Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. 浮点值扩展为其本机大小(类型 F)。Floating-point values are expanded to their native size (type F).

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

  • ILGenerator.Emit(OpCode)ILGenerator.Emit(OpCode)

适用于