O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 method object GetFormat(Type formatType);  
}

Implemented By

System.Globalization.{CultureInfo, DateTimeFormatInfo, NumberFormatInfo}

Returned By

System.IO.TextWriter.FormatProvider

Passed To

Multiple types

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required