OpCodes.Ldloc_S Campo

Definição

Carrega a variável local em um índice específico na pilha de avaliação, de forma abreviada.Loads the local variable at a specific index onto the evaluation stack, short form.

public: static initonly System::Reflection::Emit::OpCode Ldloc_S;
public static readonly System.Reflection.Emit.OpCode Ldloc_S;
 staticval mutable Ldloc_S : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldloc_S 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
11 < unsigned int8 >11 < unsigned int8 > ldloc. s indexldloc.s index Carrega a variável local no índice na index pilha, forma abreviada.Loads the local variable at index index onto stack, short form.

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

  1. O valor da variável local no índice especificado é enviado por push para a pilha.The local variable value at the specified index is pushed onto the stack.

A ldloc.s instrução envia por push o conteúdo do número da variável local no índice passado para a pilha de avaliação, em que as variáveis locais são numeradas 0 em diante.The ldloc.s instruction pushes the contents of the local variable number at the passed index onto the evaluation stack, where the local variables are numbered 0 onwards. As variáveis locais são inicializadas como 0 antes de entrar no método se o sinalizador de inicialização no método for true.Local variables are initialized to 0 before entering the method if the initialize flag on the method is true. Há 256 (2 ^ 8) variáveis locais possíveis (0-255) na forma abreviada, que é uma codificação mais eficiente do que ldloc .There are 256 (2^8) local variables possible (0-255) in the short form, which is a more efficient encoding than ldloc.

O tipo do valor é o mesmo que o tipo da variável local, que é especificado no cabeçalho do método.The type of the value is the same as the type of the local variable, which is specified in the method header. Consulte partição I. variáveis locais com menos de 4 bytes são expandidas para tipo int32 quando são carregadas na pilha.See Partition I. Local variables that are 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).

As Emit sobrecargas de método a seguir podem usar o ldloc.s opcode:The following Emit method overloads can use the ldloc.s opcode:

Aplica-se a