Mono Class Library: System.DateTime Overview | MembersSystem.DateTime.ToString Method |
Returns a string representation of the value of the current instance. [Edit]
|
- format
- A string that specifies the format of the returned string.
Note: For a list of valid values, see System.Globalization.DateTimeFormatInfo .[Edit]
A string representation of the current instance formatted as specified by format. The string takes into account the current system culture. [Edit]
Type Reason FormatException The length of the format string is 1, and it is not one of the format specifier characters defined for System.Globalization.DateTimeFormatInfo.
-or-
The format string does not contain a valid custom format pattern.
[Edit]
This version of DateTime.ToString is equivalent to DateTime.ToString (format , null ).
If format is a null reference, the general format specifier "G" is used.
Note:[Edit]This method uses the culture information of the current thread.
For information on formatting system-supplied data types, see the IFormattable interface.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0