OpCodes.Stelem_I Campo
Definição
Substitui o elemento de matriz em um determinado índice pelo valor native int na pilha de avaliação.Replaces the array element at a given index with the native int value on the evaluation stack.
public: static initonly System::Reflection::Emit::OpCode Stelem_I;
public static readonly System.Reflection.Emit.OpCode Stelem_I;
staticval mutable Stelem_I : System.Reflection.Emit.OpCode
Public Shared ReadOnly Stelem_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 |
|---|---|---|
| 9B9B | stelem. istelem.i | Substitui um elemento de matriz no índice fornecido pelo native int valor na pilha.Replaces an array element at the supplied index with the native int value on the stack. |
O comportamento de transição de pilha, em ordem sequencial, é:The stack transitional behavior, in sequential order, is:
Uma referência de objeto a uma matriz,
array, é enviada por push para a pilha.An object reference to an array,array, is pushed onto the stack.Um índice válido para um elemento em
arrayé enviado por push para a pilha.A valid index to an element inarrayis pushed onto the stack.Um valor é enviado por push para a pilha.A value is pushed onto the stack.
O valor, o índice e a referência de matriz são retirados da pilha; o valor é colocado no elemento de matriz no índice fornecido.The value, the index, and the array reference are popped from the stack; the value is put into the array element at the given index.
A stelem.i instrução substitui o valor do elemento index na matriz unidimensional array pelo native int valor enviado para a pilha.The stelem.i instruction replaces the value of the element index in the one-dimensional array array with the native int value pushed onto 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 índice é tipo native int .The index is type native int.
NullReferenceException será gerada se array for uma referência nula.NullReferenceException is thrown if array is a null reference.
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.
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.
A sobrecarga do método a seguir Emit pode usar o stelem.i opcode:The following Emit method overload can use the stelem.i opcode: