OpCodes.Ldarga 字段

定义

将参数地址加载到计算堆栈上。Load an argument address onto the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Ldarga;
public static readonly System.Reflection.Emit.OpCode Ldarga;
 staticval mutable Ldarga : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldarga 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
FE 0A < unsigned int16 >FE 0A < unsigned int16 > ldarga indexldarga index 提取 index 索引的参数地址。Fetch the address of argument indexed by index.

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

  1. index 索引的参数 addr 推送到堆栈上。The address addr of the argument indexed by index is pushed onto the stack.

@No__t-0 指令提取由 index 编制索引的自变量的地址(类型 *),其中参数从0开始编制索引。The ldarga instruction fetches the address (of type *) of the argument indexed by index, where arguments are indexed from 0 onwards. 地址 addr 始终与目标计算机上的自然边界对齐。The address addr is always aligned to a natural boundary on the target machine.

对于采用可变长度参数列表的过程,只能将 ldarga 指令用于初始固定参数,而不能用于签名的变量部分。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 用于通过引用传递的参数。ldarga is used for by-ref parameter passing. 对于其他情况,应使用 Ldarg 和 @no__t。For other cases, Ldarg and Starg should be used.

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

  • ILGenerator (操作码,short)ILGenerator.Emit(OpCode, short)

适用于