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


CurrencyFormat CoClass (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (System)  

CurrencyFormat CoClass

An object for formatting numbers in a currency format.

Product Availability

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

Description

CurrencyFormat is a coclass that formats numbers to look like a currency. For example, the number 123456.789 when formatted with CurrencyFormat (default U.S. English regional settings) would look like $123,456.79. Note that the formatted number is rounded to the nearest cent. Negative numbers are typically depicted inside parentheses, e.g., a negative number of the same value would be formatted as ($123,456.79).

To format numbers as currency, create a CurrencyFormat object and use the ValueToString method.

Supported Platforms

Windows, Solaris, Linux

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.
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

Remarks

CurrencyFormat does not have an ICurrencyFormat interface because there are no member properties to set. To use it, define an object as an INumberFormat and set it to a New CurrencyFormat. You can access the ValueToString and StringToValue methods directly from this object.

Numbers are formatted using the current regional settings defined for the system at runtime. To change the way currency numbers are formatted, change the settings on the Currency tab of Control Panel's Regional Settings applet.

See Also

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