Monday, November 13, 2006

Formatted Output

To format various outputs, use the ToString() method and specify the formatting string as a parameter. For example, formating date-time like this:

DateTime.Now.ToString("hh:mm:ss.fff")

produces output like this:

14:03:51.277

Other date-time formatting can be found in the DateTimeFormatInfo Class help pages.

No comments: