OpCodes.Add_Ovf 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
加入兩個整數,執行溢位檢查,並將結果推入評估堆疊。
public: static initonly System::Reflection::Emit::OpCode Add_Ovf;
public static readonly System.Reflection.Emit.OpCode Add_Ovf;
staticval mutable Add_Ovf : System.Reflection.Emit.OpCode
Public Shared ReadOnly Add_Ovf As OpCode
欄位值
備註
下表列出指令的十六進位及 Microsoft 中介語言(MSIL)組合格式,並附有簡短參考摘要:
| Format | 組裝格式 | Description |
|---|---|---|
| D6 | add.ovf | 會加上兩個有符號的整數值並進行溢位檢查。 |
堆疊的過渡行為依序為:
value1被推到堆疊上。value2被推到堆疊上。value2value1從堆疊中彈出;value1並value2以溢出檢查加入。結果會被推送到堆疊上。
OverflowException 若結果未被表示在結果類型中,則會被拋出。
你可以對帶符號整數執行此操作。 浮點數值則使用 Add。
可接受的運算元類型及其對應的結果資料類型列於下表。 若沒有特定類型組合的條目(例如 int32 和 float;int32 和 int64),則該指令為無效的 Microsoft 中介語言(MSIL)指令並產生錯誤。
| 運算元 | 值1類型 | value2 類型 | 結果類型 |
|---|---|---|---|
| 新增 | int32 |
int32 |
int32 |
| 新增 | int32 |
native int |
native int |
| 新增 | int32 |
& |
& |
| 新增 | int32 |
* |
* |
| 新增 | int64 |
int64 |
int64 |
| 新增 | native int |
int32 |
native int |
| 新增 | native int |
native int |
native int |
| 新增 | native int |
& |
& |
| 新增 | native int |
* |
* |
| 新增 | F |
F |
F |
| 新增 | & |
int32 |
& |
| 新增 | & |
native int |
& |
| 新增 | * |
int32 |
* |
| 新增 | * |
native int |
* |
以下 Emit 方法的超載可使用操作 add.ovf 碼: