Returns a string represenation of this instance.
| C# | Visual Basic | Visual C++ |
public string ToString( string format, IFormatProvider formatProvider )
Public Function ToString ( _ format As String, _ formatProvider As IFormatProvider _ ) As String
public: virtual String^ ToString( String^ format, IFormatProvider^ formatProvider ) sealed
- formatProvider (IFormatProvider)
- The IFormatProvider to use or null to obtain the format information from the current locale setting of the operating system.
A string representation of this instance.
The following string values are valid for format:
If you use capital letters for the string format, the precision of the returned
string representation is extended by three decimal digits.
| Format String | Description and Associated Properties |
|---|---|
| g | General format. Replaces the format string by ms, s,
m, or t as appropriate regarding the value of this instance. |
| ms | Millisecond format. |
| s | Second format. |
| h | Hour format. |
| d | Day format. |
| t | Full format, equal to the format returned by ToString()()(). |
