| ||Abstract classes, Interfaces, and Patterns - slide 17 : 37|
Sample use of IFormattable
The ToString method prescribed by IFormattable takes two parameters which allow finer control of
the string generation than the parameterless method ToString from class Object.
A reproduction of the interface IFormattable.
- The ToString method of IFormattable:
- The first parameter is typically a single letter formatting string,
and the other is an IFormatProvider
- The IformatProvider can provide culture sensible information.
- ToString from Object typically calls ToString(null, null)
The struct Card that implements IFormattable.
A client of Card which applies formatting of cards.
Output from the client program.