DecimalFormat.MaximumSignificantDigits Property

Definition

<strong>[icu]</strong> Returns the effective maximum number of significant digits displayed. -or- <strong>[icu]</strong> <strong>Rounding and Digit Limits:</strong> Sets the maximum number of significant digits to be displayed.

public virtual int MaximumSignificantDigits { [Android.Runtime.Register("getMaximumSignificantDigits", "()I", "GetGetMaximumSignificantDigitsHandler", ApiSince=24)] get; [Android.Runtime.Register("setMaximumSignificantDigits", "(I)V", "GetSetMaximumSignificantDigits_IHandler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getMaximumSignificantDigits", "()I", "GetGetMaximumSignificantDigitsHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setMaximumSignificantDigits", "(I)V", "GetSetMaximumSignificantDigits_IHandler", ApiSince=24)>]
member this.MaximumSignificantDigits : int with get, set

Property Value

Attributes

Remarks

Property getter documentation:

<strong>[icu]</strong> Returns the effective maximum number of significant digits displayed.

Java documentation for android.icu.text.DecimalFormat.getMaximumSignificantDigits().

Property setter documentation:

<strong>[icu]</strong> <strong>Rounding and Digit Limits:</strong> Sets the maximum number of significant digits to be displayed. If the number of significant digits in the number exceeds this value, the number will be rounded according to the current rounding mode.

For example, if maximum significant digits is 3 and the number is 12345, the number will be printed as "12300".

If minimum and maximum integer, fraction, or significant digits conflict with each other, the most recently specified value is used. For example, if there is a formatter with minInt=5, and then you set maxInt=3, then minInt will be changed to 3.

See #setRoundingIncrement and #setMaximumFractionDigits for two other ways of specifying rounding strategies.

Java documentation for android.icu.text.DecimalFormat.setMaximumSignificantDigits(int).

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