Freigeben über


BigDecimal.ByteValueExact Method

Definition

Converts this BigDecimal to a byte, checking for lost information.

[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

Returns

this BigDecimal converted to a byte.

Attributes

Exceptions

if rounding is necessary or the number doesn't fit in a byte.

Remarks

Converts this BigDecimal to a byte, checking for lost information. If this BigDecimal has a nonzero fractional part or is out of the possible range for a byte result then an ArithmeticException is thrown.

Added in 1.5.

Java documentation for java.math.BigDecimal.byteValueExact().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to