OpCodes.Conv_Ovf_U1_Un Campo
Definição
Converte o valor sem sinal no topo da pilha de avaliação em unsigned int8 e estende-o para int32, gerando OverflowException no estouro.Converts the unsigned value on top of the evaluation stack to unsigned int8 and extends it to int32, throwing OverflowException on overflow.
public: static initonly System::Reflection::Emit::OpCode Conv_Ovf_U1_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U1_Un;
staticval mutable Conv_Ovf_U1_Un : System.Reflection.Emit.OpCode
Public Shared ReadOnly Conv_Ovf_U1_Un 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 |
|---|---|---|
| 8686 | conv. ovf. U1. unconv.ovf.u1.un | Converte um valor não assinado em um unsigned int8 (na pilha como int32 ) e gera uma exceção no estouro.Converts an unsigned value to an unsigned int8 (on the stack as int32) and throw an exception on overflow. |
O comportamento de transição de pilha, em ordem sequencial, é:The stack transitional behavior, in sequential order, is:
valueé enviado por push para a pilha.valueis pushed onto the stack.valueé retirado da pilha e a operação de conversão é tentada.valueis popped from the stack and the conversion operation is attempted. Se o estouro ocorrer, uma exceção será lançada.If overflow occurs, an exception is thrown.Se a conversão for bem-sucedida, o valor resultante será enviado por push para a pilha.If the conversion is successful, the resulting value is pushed onto the stack.
O conv.ovf.u1.un opcode converte o value no topo da pilha para o tipo especificado no opcode e coloca o valor convertido na parte superior da pilha.The conv.ovf.u1.un opcode converts the value on top of the stack to the type specified in the opcode, and places that converted value on the top of the stack. Se o valor for muito grande ou muito pequeno para ser representado pelo tipo de destino, uma exceção será lançada.If the value is too large or too small to be represented by the target type, an exception is thrown.
As conversões de números de ponto flutuante para valores inteiros truncam o número em direção a zero.Conversions from floating-point numbers to integer values truncate the number toward zero. Observe que os valores inteiros de menos de 4 bytes são estendidos para int32 quando eles são carregados na pilha de avaliação (a menos que conv.ovf.i ou conv.ovf.u sejam usados; nesse caso, o resultado também é native int ).Note that integer values of less than 4 bytes are extended to int32 when they are loaded onto the evaluation stack (unless conv.ovf.i or conv.ovf.u are used, in which case the result is also native int).
OverflowException será gerado se o resultado não puder ser representado no tipo de resultado.OverflowException is thrown if the result can not be represented in the result type.
A sobrecarga do método a seguir Emit pode usar o conv.ovf.u1.un opcode:The following Emit method overload can use the conv.ovf.u1.un opcode: