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

IFormattable

Synopsis

This interface is implemented in your objects to provide a custom ToString() method that accepts a format string and an IFormatProvider instance. You can then use this information to determine how the return string should be rendered. All numeric value types in the System namespace implement this interface.

public interface IFormattable {
// Public Instance Methods
   public method string ToString(string format, 
        IFormatProvider formatProvider);  
}

Implemented By

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