Name
IFormatProvider
Synopsis
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
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.