Saturday, September 29, 2007

Number Formatting in C# using String.Format

Just so that i remember it next time. Number formatting examples (for US english):

double x = 12345.6789;

String.Format("{0:n0}") ... 12,345
String.Format("{0:n1}") ... 12,345.6

etc...

No comments: