Interface IFormattable
Provides functionality to format the value of an object into a string representation.
Namespace: System
Assembly: mscorlib.dll
Syntax
public interface IFormattable
Remarks
Available only in mscorlib build with support for System.Reflection.
Methods
| Improve this Doc View SourceToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Declaration
string ToString(string format, IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
String | format | The format to use -or- A null reference(Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation. |
IFormatProvider | formatProvider | The provider to use to format the value -or- A null reference(Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system. |
Returns
Type | Description |
---|---|
String | The value of the current instance in the specified format. |