OpCodes.Ldelem_I2 Campo
Definição
Carrega o elemento com o tipo int16 em um índice de matriz especificado para o topo da pilha de avaliação como um int32.Loads the element with type int16 at a specified array index onto the top of the evaluation stack as an int32.
public: static initonly System::Reflection::Emit::OpCode Ldelem_I2;
public static readonly System.Reflection.Emit.OpCode Ldelem_I2;
staticval mutable Ldelem_I2 : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldelem_I2 As OpCode
Valor do campo
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 |
|---|---|---|
| 9292 | ldelem. i2ldelem.i2 | Carrega o elemento com o tipo int16 no index topo da pilha como um int32 .Loads the element with type int16 at index onto the top of the stack as an int32. |
O comportamento de transição de pilha, em ordem sequencial, é:The stack transitional behavior, in sequential order, is:
Uma referência
arrayde objeto é enviada por push para a pilha.An object referencearrayis pushed onto the stack.Um valor de índice
indexé enviado por push para a pilha.An index valueindexis pushed onto the stack.indexearraysão retirados da pilha; o valor armazenado na posiçãoindexemarrayé pesquisado.indexandarrayare popped from the stack; the value stored at positionindexinarrayis looked up.O valor é enviado por push para a pilha.The value is pushed onto the stack.
A ldelem.i2 instrução carrega o valor do elemento com index index (Type native int ) na matriz unidimensional de base zero array e o coloca na parte superior da pilha.The ldelem.i2 instruction loads the value of the element with index index (type native int) in the zero-based one-dimensional array array and places it on the top of the stack. Matrizes são objetos e, portanto, representados por um valor do tipo O .Arrays are objects and hence represented by a value of type O.
O valor de retorno para ldelem.i2 é int16 .The return value for ldelem.i2 is int16.
Observe que os valores inteiros de menos de 4 bytes são estendidos para int32 (não native int ) quando são carregados na pilha de avaliação.Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack.
NullReferenceException será gerada se array for uma referência nula.NullReferenceException is thrown if array is a null reference.
ArrayTypeMismatchException será gerado se não array mantiver elementos do tipo necessário.ArrayTypeMismatchException is thrown if array does not hold elements of the required type.
IndexOutOfRangeException será gerado se index for negativo ou maior que o limite de array .IndexOutOfRangeException is thrown if index is negative, or larger than the bound of array.
A sobrecarga do método a seguir Emit pode usar o ldelem.i2 opcode:The following Emit method overload can use the ldelem.i2 opcode: