DecimalFormatter Class

Formate et analyse les nombres décimaux.

Syntaxe


var decimalFormatter = new Windows.Globalization.NumberFormatting.DecimalFormatter(iIterable(String));
var decimalFormatter = new Windows.Globalization.NumberFormatting.DecimalFormatter();

Attributs

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Membres

DecimalFormatterClasse possède ces types de membres :

Constructeurs

DecimalFormatterClasse possède ces constructeurs.

ConstructeurDescription
DecimalFormatter() Creates a DecimalFormatter object and initializes it to default values.
DecimalFormatter(IIterable(String), String) Creates a DecimalFormatter object initialized by a language list and a geographic region.

 

Méthodes

The DecimalFormatter Classe a les méthodes suivantes. Avec C#, Visual Basic et C++, elle hérite également des méthodes de Object Classe.

MéthodeDescription
Format(Double) Returns a string representation of a Double number.
Format(Int64) Returns a string representation of an Int64 number.
Format(UInt64) Returns a string representation of a UInt64 number.
FormatDouble Returns a string representation of a Double number.
FormatInt Returns a string representation of an Int64 number.
FormatUInt Returns a string representation of a UInt64 number.
ParseDouble Attempts to parse a string representation of a Double number.
ParseInt Attempts to parse a string representation of an integer.
ParseUInt Attempts to parse a string representation of an unsigned integer.

 

Propriétés

Le DecimalFormatterClasse a les propriétés suivantes.

PropriétéType d'accèsDescription

FractionDigits

Lecture/écritureGets or sets the minimum number of digits to display for the fraction part of the number.

GeographicRegion

En lecture seuleGets the region that is used when formatting and parsing decimal numbers.

IntegerDigits

Lecture/écritureGets or sets the minimum number of digits to display for the integer part of the number.

IsDecimalPointAlwaysDisplayed

Lecture/écritureGets or sets whether the decimal point of the number should always be displayed.

IsGrouped

Lecture/écritureGets or sets whether the integer part of the number should be grouped.

IsZeroSigned

Lecture/écritureGets or sets whether -0 is formatted as -0 or 0.

Languages

En lecture seuleGets the priority list of language identifiers that is used when formatting and parsing decimal numbers.

NumberRounder

Lecture/écritureGets or sets the current rounding strategy to be used when formatting numbers.

NumeralSystem

Lecture/écritureGets or sets the numbering system that is used to format and parse decimal numbers.

ResolvedGeographicRegion

En lecture seuleGets the geographic region that was most recently used to format or parse decimal values.

ResolvedLanguage

En lecture seuleGets the language that was most recently used to format or parse decimal values.

SignificantDigits

Lecture/écritureGets or sets the current padding to significant digits when a decimal number is formatted.

 

Remarques

Si votre application passe les balises de langue utilisées cette classe aux fonctions NLS (National Language Support), elle doit d'abord convertir les balises en appelant ResolveLocaleName.

Conditions requises

Client minimal pris en charge

Windows 8 [Applications Windows Store, applications de bureau]

Serveur minimal pris en charge

Windows Server 2012 [Applications Windows Store, applications de bureau]

Espace de noms

Windows.Globalization.NumberFormatting
Windows::Globalization::NumberFormatting [C++]

Métadonnées

Windows.winmd

Voir aussi

Object
INumberFormatterOptions
INumberFormatter
INumberFormatter2
INumberParser
ISignificantDigitsOption
INumberRounderOption

 

 

Afficher:
© 2014 Microsoft