Style.NumberType

Style.NumberType property

Gets or sets the display format of numbers and dates. The formatting patterns are different for different regions.

public int NumberType { get; set; }

Remarks

For example, the formatting patterns represented by numbers for en_US region:

ValueTypeFormat String
0GeneralGeneral
1Decimal0
2Decimal0.00
3Decimal#,##0
4Decimal#,##0.00
5Currency$#,##0_);($#,##0)
6Currency$#,##0_);[Red]($#,##0)
7Currency$#,##0.00_);($#,##0.00)
8Currency$#,##0.00_);[Red]($#,##0.00)
9Percentage0%
10Percentage0.00%
11Scientific0.00E+00
12Fraction# ?/?
13Fraction# ??/??
14Datem/d/yyyy
15Dated-mmm-yy
16Dated-mmm
17Datemmm-yy
18Timeh:mm AM/PM
19Timeh:mm:ss AM/PM
20Timeh:mm
21Timeh:mm:ss
22Timem/d/yyyy h:mm
37Accounting#,##0_);(#,##0)
38Accounting#,##0_);[Red](#,##0)
39Accounting#,##0.00_);(#,##0.00)
40Accounting#,##0.00_);[Red](#,##0.00)
41Accounting_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
42Currency_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)
43Accounting_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)
44Currency_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)
45Timemm:ss
46Time[h]:mm:ss
47Timemm:ss.0
48Scientific##0.0E+0
49Text@

See Also