System Namespace IFormattable Interface
Formats the value of the current instance using the specified format.
[ VB ]
Function ToString ( _
ByVal format As String, _
ByVal formatProvider As IFormatProvider _
) As String
[ C# ]
string ToString (
string format,
IFormatProvider formatProvider
);
[ C++ ]
String* ToString (
String* format,
IFormatProvider* formatProvider
);
[ JScript ]
function ToString (
format : String,
formatProvider : IFormatProvider
) : String;
- format
- The String specifying 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.
- formatProvider
- The IFormatProvider 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.
A String containing the value of the current instance in the specified format.
NumberFormatInfo, DateTimeFormatInfo and CultureInfo implement the IFormatProvider interface.
NumberFormatInfo supplies numeric formatting information, such as the characters to use for decimal and thousand separators and the spelling and placement of currency symbols in monetary values.
DateTimeFormatInfo supplies date- and time-related formatting information, such as the position of the month, the day and the year in a date pattern.
CultureInfo contains the default formatting information in a specific culture, including the numeric format information and date- and time-related formatting information.
IFormattable Members String IFormatProvider CultureInfo DateTimeFormatInfo NumberFormatInfo