System.DateTime.ToString Method

Returns a string representation of the value of the current instance.

Syntax

public override string ToString ()

Returns

A string representation of the current instance formatted using the general format specifier, ("G"). The string takes into account the current system culture.

Remarks

This version of DateTime.ToString is equivalent to DateTime.ToString ("G", null ).

Note:

For more information about the general format specifier ("G") see System.Globalization.DateTimeFormatInfo.

This method overrides object.ToString.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0