Share via


Windows.Globalization.NumberFormatting Namespace

Provides classes for formatting currencies, decimal numbers, percent values, and permille values, based on the user's languages and geographic region.

Note

If you're using C++ or C, then also consider the International Components for Unicode (ICU).

Classes

CurrencyFormatter

Formats and parses currencies.

DecimalFormatter

Formats and parses decimal numbers.

IncrementNumberRounder

Rounds numbers to a specified increment.

For example, this class can be used to round a number to the nearest 0.01.

NumeralSystemTranslator

Translates digits of the Latin numerical system into digits of another numerical system.

PercentFormatter

Formats and parses percentages.

PermilleFormatter

Formats and parses permillages.

SignificantDigitsNumberRounder

Rounds numbers to a specified number of significant digits.

Interfaces

INumberFormatter

An interface that returns a string representation of a provided value, using an overloaded Format method to format several data types.

INumberFormatter2

An interface that returns a string representation of a provided value, using distinct format methods to format several data types.

INumberFormatterOptions

An interface that gets and sets options for formatting numbers.

INumberParser

An interface that parses a string representation of a numeric value.

INumberRounder

An interface that returns rounded results for provided numbers of several data types.

INumberRounderOption

An interface that gets and sets the option for rounding numbers.

ISignedZeroOption

An interface that gets and sets the option for specifying whether -0 is formatted as "-0" or "0".

ISignificantDigitsOption

An interface that gets and sets the option for specifying significant digits.

Enums

CurrencyFormatterMode

Specifies the use of symbols or codes when currency is formatted.

This enumeration is used by the Mode property of CurrencyFormatter.

RoundingAlgorithm

Specifies the algorithm used to round numbers.

Remarks

If your app passes language tags from this namespace to any National Language Support functions, it must first convert the tags by calling ResolveLocaleName.

For a list of standard country/region codes used by Microsoft, see the Official Country/Region List.

See also