BigDecimal.ByteValueExact 方法

定义

将此项 BigDecimal 转换为检查 byte丢失的信息。

[Android.Runtime.Register("byteValueExact", "()B", "GetByteValueExactHandler")]
public virtual sbyte ByteValueExact();
[<Android.Runtime.Register("byteValueExact", "()B", "GetByteValueExactHandler")>]
abstract member ByteValueExact : unit -> sbyte
override this.ByteValueExact : unit -> sbyte

返回

BigDecimal转换为 .byte

属性

例外

如果需要舍入,或者该数字不适合字节。

注解

将此项 BigDecimal 转换为检查 byte丢失的信息。 如果这是 BigDecimal 非零的小数部分,或者结果的可能范围 byte 不足,则会引发一个 ArithmeticException

在 1.5 中添加。

Java文档java.math.BigDecimal.byteValueExact()

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于