BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(true)

The interface supplies an object that provides formatting information for formatting and parsing operations. Formatting operations convert the value of a type to the string representation of that value. Typical formatting methods are the ToString methods of a type, as well as . Parsing operations convert the string representation of a value to a type with that value. Typical parsing methods are Parse and TryParse.

The interface consists of a single method, . is a callback method: The parsing or formatting method calls it and passes it a object that represents the type of object that the formatting or parsing method expects will provide formatting information. The method is responsible for returning an object of that type.

implementations are often used implicitly by formatting and parsing methods. For example, the method implicitly uses an implementation that represents the system's current culture. implementations can also be specified explicitly by methods that have a parameter of type , such as and .

The .NET Framework includes the following three predefined implementations to provide culture-specific information that is used in formatting or parsing numeric and date and time values:

The class, which provides information that is used to format numbers, such as the currency, thousands separator, and decimal separator symbols for a particular culture. For information about the predefined format strings recognized by a object and used in numeric formatting operations, see Standard Numeric Format Strings and Custom Numeric Format Strings.

The class, which provides information that is used to format dates and times, such as the date and time separator symbols for a particular culture or the order and format of a date's year, month, and day components. For information about the predefined format strings recognized by a object and used in numeric formatting operations, see Standard Date and Time Format Strings and Custom Date and Time Format Strings.

The class, which represents a particular culture. Its method returns a culture-specific or object, depending on whether the object is used in a formatting or parsing operation that involves numbers or dates and times.

The .NET Framework also supports custom formatting. This typically involves the creation of a formatting class that implements both and . An instance of this class is then passed as a parameter to a method that performs a custom formatting operation, such as The example provides an illustration of such a custom implementation that formats a number as a 12-digit account number.

Provides a mechanism for retrieving an object to control formatting.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  is a callback method that formatting and parsing methods invoke to retrieve information about the format of the input string in parsing operations or the format of the output string in formatting operations. In the parameter, the formatting or parsing method passes the type of object it requires to perform its operation. If the implementation can supply this formatting or parsing object, it returns that object. If not, it returns null.

  For example, in the call to the method, the method argument is an object that provides information about how the string representation of the current integer instance might be formatted. When the runtime executes the method, it calls the object's method and passes it a object that represents the type. If the object can supply a object, it returns that object. If it cannot supply an object of that type, it returns null.

  You can implement the interface and the method in classes that provide custom formatting or parsing services. The implementation is then passed as an argument to any overload of a parsing or formatting method that has a parameter of type , such as , , or .

  Returns an object that provides formatting services for the specified type.

  An instance of the object specified by , if the implementation can supply that type of object; otherwise, null.

  An object that specifies the type of format object to return. 0
0