ArcObjects Library Reference (System)  

INumericFormat.RoundingOption Property

The rounding option applied to the ValueToString method.

[Visual Basic .NET]
Public Property RoundingOption As esriRoundingOptionEnum
[C#]
public esriRoundingOptionEnum RoundingOption {get; set;}
[C++]
HRESULT get_RoundingOption(
  esriRoundingOptionEnum* pption
);
[C++]
HRESULT put_RoundingOption(
  esriRoundingOptionEnum pption
);
[C++]

Parameters

pption [out, retval]

  pption is a parameter of type esriRoundingOptionEnum

pption [in]

  pption is a parameter of type esriRoundingOptionEnum

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The RoundingOption property sets or returns the rounding option to be used when the ValueToString method in the associated INumberFormat interface formats numbers.

The settings for RoundingOption are:

Setting Description

esriRoundNumberOfDecimals

(Default) Numbers are rounded to the number of decimal places defined in the RoundingValue property.

If ZeroPad is also set True, decimal zeros are appended at the right up to the number of places indicated in the RoundingValue property.

esriRoundNumberOfSignificantDigits

Numbers are rounded to the number of significant digits indicated in the RoundingValue property.

To format numbers and express significant zeros at the right of the decimal, set ZeroPad True. For example, the number 12.0345 in 8 significant digits is the number 12.034500. In order to express the rightmost significant zeros, ZeroPad should be set True. With ZeroPad set False, the formatted number would be 12.0345.

 

See Also

INumericFormat Interface | IScientificNumberFormat Interface | PercentageFormat Class | INumberFormat Interface | INumericFormat Interface | FractionFormat Class | IPercentageFormat Interface | ILatLonFormat Interface | ILatLonFormat2 Interface | LatLonFormat Class | ICustomNumberFormat Interface | RateFormat Class | NumericFormat Class | ScientificFormat Class | IRateFormat Interface | AngleFormat Class | IFractionFormat Interface | CurrencyFormat Class | CustomNumberFormat Class | IAngleFormat Interface