Export (0) Print
Expand All

Numeric Format Strings

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Numeric format strings control formatting operations in which a numeric data type is represented as a string.

Numeric format strings fall into two categories:

  • Standard numeric format strings.

    Standard numeric format strings consist of one of a set of standard numeric format specifiers. Each standard format specifier denotes a particular, commonly used string representation of numeric data.

  • Custom numeric format strings.

    Custom format strings consist of one or more custom numeric format specifiers. Combine custom numeric format specifiers to define an application-specific pattern that determines how numeric data is formatted.

Numeric format strings are supported by the ToString method of numeric types. Numeric format strings are also supported by the .NET Framework composite formatting feature, which is used by certain Write and WriteLine methods of the Console and StreamWriter classes, the String.Format method, and the StringBuilder.AppendFormat method.

Show:
© 2014 Microsoft