ArcObjects Library Reference  (System)    

INumericFormat.RoundingOption Property

The rounding option applied to the ValueToString method.

[Visual Basic 6.0]
Property RoundingOption As esriRoundingOptionEnum
[Visual Basic .NET]
Public Property RoundingOption As esriRoundingOptionEnum
[C#]
public esriRoundingOptionEnum RoundingOption {get; set;}
[Java]
public esriRoundingOptionEnum getRoundingOption()
throws
    IOException,
    AutomationException
[Java]
public void setRoundingOption(
esriRoundingOptionEnum psriRoundingOptionEnum
)
throws
    IOException,
    AutomationException
[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 | IFractionFormat Interface | AngleFormat Class | IAngleFormat Interface | IPercentageFormat Interface | ICustomNumberFormat Interface | CurrencyFormat Class | LatLonFormat Class | FractionFormat Class | IRateFormat Interface | RateFormat Class | ILatLonFormat2 Interface | NumericFormat Class | CustomNumberFormat Class | INumericFormat Interface | PercentageFormat Class | IScientificNumberFormat Interface | ILatLonFormat Interface | INumberFormat Interface | ScientificFormat Class

Example

NumericFormat Example