C # in a Nutshell, Second Edition

IFormatProvider CF 1.0, ECMA 1.0

System (mscorlib.dll) interface

This interface provides a way to retrieve an object that controls formatting through the GetFormat( ) method. For example, the System.Globalization.CultureInfo class can return a System.Globalization.NumberFormatInfo object, a System.Globalization.DateTimeFormatInfo object, or a null reference, depending on the supplied formatType parameter.

public interface IFormatProvider { // Public Instance Methods public object GetFormat (Type formatType ); }

Implemented By

System.Globalization.{CultureInfo , DateTimeFormatInfo , NumberFormatInfo}

Returned By

System.IO.TextWriter.FormatProvider

Passed To

Multiple types

Категории