【发布时间】:2009-02-09 23:28:12
【问题描述】:
在这样的字典中:
Dictionary<string, string> openWith = new Dictionary<string, string>();
openWith.Add("txt", "notepad.exe");
openWith.Add("bmp", "paint.exe");
openWith.Add("dib", "paint.exe");
openWith.Add("rtf", "wordpad.exe");
Console.WriteLine("For key = \"rtf\", value = {0}.", openWith["rtf"]);
输出是:
对于 Key = "rtf" value = wordpad.exe
{0} 是什么意思?
【问题讨论】:
标签: c# string formatting