format string
A code like C2 or N0 that says how to display a number or date.
A standard or custom format string (C, N, F2, P, yyyy-MM-dd) controls how a value is converted to text, interpreted using a culture.
Examples
12.5m.ToString("C2", CultureInfo.GetCultureInfo("en-US"))is$12.50, and1234567.ToString("N0", CultureInfo.InvariantCulture)is1,234,567.
See also