我正在尝试学习String.Format,但它不断抛出FormatException。
谁能指出我的错误?
static void Main(string[] args)
{
var d = new DateTime(2016,5,10);
var p = "Trumph";
Console.WriteLine(String.Format("Mr. {1} will be elected as president on {2}", p, d));
Console.ReadKey();
}
Run Code Online (Sandbox Code Playgroud)