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 string ToString(stringformat
, IFormatProviderformatProvider
); }
Implemented By
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.