ArcGIS Enterprise SDK
IFractionFormat Interface
ArcGIS Enterprise SDK Developer Help > ArcGIS Enterprise SDK API Reference > ArcGIS Enterprise SDK .NET Namespaces > ESRI.Server.System > Interfaces > IF > IFractionFormat Interface
ArcGIS Developer Help (ESRI.ArcGIS.esriSystem)

IFractionFormat Interface

Provides access to members that format fractions.

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

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

Classes that implement IFractionFormat

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