An object for formatting numbers in a rate format.
Product Availability
Description
RateFormat is the IRateFormat interface coclass who's members determine how the ValueToString method in the associated INumberFormat interface formats numeric values accoring to a given rate factor and string suffix.
RateFormat also inherits the INumericFormat interface, so both these interface's properties determine how numbers are formatted.
Supported Platforms
Interfaces
Interfaces | Description |
---|---|
IClone | Provides access to members that control cloning of objects. |
INumberFormat | Provides access to members that format numbers. |
INumberFormatOperations | Provides access to common operations on formatted numbers. |
INumericFormat | Provides access to members that format numbers. |
IPersist (esriSystem) | Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile. |
IPersistStream | |
IRateFormat | Provides access to members that format rates. |
Remarks
RateString and RateFactor determine how the formatting takes place when using the ValueToString and StringToValue methods of the associated INumberFormat interface.
When using the ValueToString method, any string defined in the RateString property (the default value is Null) is appended to the methods input value. Also, the value in the RateFactor property (the default value is 1000) is divided into the ValueToString argument value. For example, ValueToString (300) with a RateFactor of 3 and a RateString of loaves would return a formatted string of 100 loaves.
The corresponding StringToValue method also uses both these properties. The value from the input string is multiplied by the value in the RateFactor property when StringToValue converts the number back. Also, if set, the RateString is stripped from the result. To obtain the numerical value that was used as an argument to the ValueToString method, make sure the RateFactor property is the same as it was when the ValueToString method was originally used.
See Also
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