我在这个site上看到了一个StringBuilder代码示例,说明了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
在哪里可以找到有关字符串格式的高级规则的文档?