OpCodes.Ldarg_2 Campo

Definição

Carrega o argumento no índice 2 na pilha de avaliação.Loads the argument at index 2 onto the evaluation stack.

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

Valor do campo

OpCode

Comentários

A tabela a seguir lista o formato de assembly hexadecimal e da MSIL (Microsoft Intermediate Language) da instrução, juntamente com um resumo de referência breve:The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:

FormatarFormat Formato do assemblyAssembly Format DescriçãoDescription
0404 ldarg. 2ldarg.2 Carregar argumento 2 na pilha.Load argument 2 onto stack.

O comportamento de transição de pilha, em ordem sequencial, é:The stack transitional behavior, in sequential order, is:

  1. O valor do argumento no índice 2 é enviado para a pilha.The argument value at index 2 is pushed onto the stack.

A ldarg.2 instrução é uma codificação eficiente para carregar o valor do argumento no índice 2.The ldarg.2 instruction is an efficient encoding for loading the argument value at index 2.

A ldarg.2 instrução envia por push o argumento indexado em 2 na pilha de avaliação.The ldarg.2 instruction pushes the argument indexed at 2 onto the evaluation stack. A ldarg.2 instrução pode ser usada para carregar um tipo de valor ou um valor primitivo na pilha copiando-o de um argumento de entrada.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. O tipo do valor do argumento é o mesmo que o tipo do argumento, conforme especificado pela assinatura do método atual.The type of the argument value is the same as the type of the argument, as specified by the current method's signature.

Os argumentos que contêm um valor inteiro menor que 4 bytes de comprimento são expandidos para int32 o tipo quando eles são carregados na pilha.Arguments that hold an integer value smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Os valores de ponto flutuante são expandidos para seu tamanho nativo (tipo F ).Floating-point values are expanded to their native size (type F).

A sobrecarga do método a seguir Emit pode usar o ldarg.2 opcode:The following Emit method overload can use the ldarg.2 opcode:

Aplica-se a