ArcObjects Library Reference  (System)    

IFractionFormat Interface

Provides access to members that format fractions.

Product Availability

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

Description

The members in the IFractionFormat interface define how the ValueToString method in the associated INumberFormat interface formats numbers.

Use the IFractionFormat interface to either convert from a decimal fraction to a formatted fraction (using the ValueToString method) or to evaluate a formatted fraction as a decimal (using the StringToValue method). Basically, this means that ValueToString could convert an input of 0.75 to a string such as 3/4, and 2.5 could become 2 1/2, while StringToValue would do the reverse.

The properties FractionOption and FractionFactor give you more control over how the ValueToString conversion takes place because they allow you to use the FractionFactor to specify what denominator should be used for the output. The way in which this FractionFactor is used depends on which of the two settings (esriFractionOptionEnum) is used for the FractionOption property.

When To Use

Use the IFractionFormat interface to determine fractions for given decimal values or to evaluate formatted fractions.

Members

Description
Read/write property FractionFactor The maximum number of digits for the numerator or denominator, or the denominator of the formatted fraction.
Read/write property FractionOption The fraction option determines how the numerator and denominator of the fraction are treated.

CoClasses that implement IFractionFormat

CoClasses and Classes Description
FractionFormat An object for formatting numbers in a fraction format.

See Also

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

FractionFormat Example