Advanced Formatting Rules for StringBuilder.AppendFormat

I saw a StringBuilder sample code on this site illustrating the use of AppendFormat :

 using System; using System.Text; class Program { static int[] _v = new int[] { 1, 4, 6 }; static void Main() { StringBuilder b = new StringBuilder(); foreach (int v in _v) { b.AppendFormat("int: {0:0.0}{1}", v, Environment.NewLine); } Console.WriteLine(b.ToString()); } } 
 === Output of the program === int: 1.0 int: 4.0 int: 6.0 

Where can I find documentation on these advanced rules for formatting strings?

+4
source share
3 answers

Are you looking for this ?

+3
source

You can start by checking out the Composite Formatting article on MSDN. From there, you will find links to standard format strings for numbers and dates , as well as links to custom format strings for numbers and.

+1
source

All Articles