OpCodes.Ldelem_I Campo
Definição
Carrega o elemento com o tipo native int em um índice de matriz especificado para o topo da pilha de avaliação como um native int.Loads the element with type native int at a specified array index onto the top of the evaluation stack as a native int.
public: static initonly System::Reflection::Emit::OpCode Ldelem_I;
public static readonly System.Reflection.Emit.OpCode Ldelem_I;
staticval mutable Ldelem_I : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldelem_I 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 |
|---|---|---|
| 9797 | ldelem. ildelem.i | Carrega o elemento com o tipo native int no index topo da pilha como um native int .Loads the element with type native int at index onto the top of the stack as a native int. |
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.i 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.i 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.i é native int .The return value for ldelem.i is native int.
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.i opcode:The following Emit method overload can use the ldelem.i opcode: