This document is archived and information here might be outdated.  Recommended version.


INumericFormat.ZeroPad Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (System)  

INumericFormat.ZeroPad Property

Indicates if formatted numbers contain padded zeros to the right of the decimal.

[Visual Basic .NET]
Public Property ZeroPad As Boolean
[C#]
public bool ZeroPad {get; set;}
[C++]
HRESULT get_ZeroPad(
  VARIANT_BOOL* pad
);
[C++]
HRESULT put_ZeroPad(
  VARIANT_BOOL pad
);
[C++]

Parameters pad [out, retval] pad is a parameter of type VARIANT_BOOL pad [in] pad is a parameter of type VARIANT_BOOL

Product Availability

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

Description

The ZeroPad property sets or returns an indicator that tells whether to pad zeros at the right of the decimal when the ValueToString method in the associated INumberFormat interface formats numbers.

The settings for ZeroPad are:

Setting Description

False

(Default) Numbers are formatted without padding decimal zeros. The last decimal digit (to the right of the decimal point) is a non-zero digit.

True

Decimal zeros or significant digit zeros are appended at the right of the decimal point up to the number of places indicated in the RoundingValue property.

The RoundingOption setting determines whether decimal zeros or significant digit zeros are appended.

 

Remarks

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 | CurrencyFormat Class | IScientificNumberFormat Interface | FractionFormat Class | IPercentageFormat Interface | INumericFormat Interface | IFractionFormat Interface | NumericFormat Class | IAngleFormat Interface | LatLonFormat Class | ICustomNumberFormat Interface | PercentageFormat Class | ILatLonFormat2 Interface | ILatLonFormat Interface | RateFormat Class | IRateFormat Interface | CustomNumberFormat Class | INumberFormat Interface | ScientificFormat Class | AngleFormat Class

.NET Snippets

Decimal Degree Angle Radian Example