asp.net.ph

IFormatProvider Interface

System Namespace


Provides a mechanism for retrieving an object to control formatting.

IFormatProvider Interface Members

Collapse   Methods

Visibility Name Parameters Return Type
public GetFormat ( Type formatType ) Object

Classes that Implement IFormatProvider


Class Description
CultureInfo Represents information about a specific culture including the names of the culture, the writing system, and the calendar used, as well as access to culture-specific objects that provide methods for common operations, such as formatting dates and sorting strings.
DateTimeFormatInfo Defines how DateTime values are formatted and displayed, depending on the culture.
NumberFormatInfo Defines how numeric values are formatted and displayed, depending on the culture.

Remarks

Some methods in the common language runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation.

A class or value type implements the GetFormat method of this interface to obtain an object that provides format information or processing for the implementing type.

For example, IFormatProvider is implemented by NumberFormatInfo and DateTimeFormatInfo. NumberFormatInfo provides culture-specific information used to format numbers in the base data types, and DateTimeFormatInfo provides culture-specific information used to format date and time values.

See Also

ICustomFormatter   IFormattable Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph