O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Format Specifiers

Format specifiers are strings that specify how to apply formatting to a base type. They are typically used with formatting functions such as String.Format() or the ToString() method. Format specifiers can be used alone or with a format provider, which is discussed later. The .NET Framework provides a set of standard format specifiers for numeric, date, time, and enumeration types. When the standard format specifiers do not meet the need, you can apply custom format specifiers to the formatting functions.

Numeric Format Specifiers

Standard numeric format specifiers are used to format numeric types to string in predefined patterns. The format specifier takes the following form:

Ann

Where A is an alphabetic format specifier and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required