Assembly: mscorlib (in mscorlib.dll)
IFormattable is implemented by the base data types.
A format describes the appearance of an object when it is converted to a string. A format can be either standard or custom. A standard format takes the form Axx, where A is an alphabetic character called the format specifier, and xx is a nonnegative integer called the precision specifier. The format specifier controls the type of formatting applied to the value being represented as a string. The precision specifier controls the number of significant digits or decimal places in the string, if applicable.
When a format includes symbols that vary by culture, such as the currency symbol represented by the "C" and "c" formats, a formatting object supplies the actual characters used in the string representation. A method might include a parameter to pass an IFormatProvider object that supplies a formatting object, or the method might use the default formatting object, which contains the symbol definitions for the current thread. The current thread typically uses the same set of symbols used system-wide by default.Notes to Implementers Classes that require more control over the formatting of strings than Object.ToString provides should implement IFormattable, whose ToString method uses the current thread's CurrentCulture property. A class that implements IFormattable must support the "G" (general) formatting code. Besides the "G" code, the class can define the list of formatting codes that it supports. For more information on formatting and formatting codes, see Formatting Overview.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.