字符串格式化提示参数格式错误

string str = "  aaaa {CreateTemplateTime}  {0}";

string.Format(str,aaa);

报错 字符串格式化提示参数格式错误

原因

{CreateTemplateTime}  用了 "{}" 里面没有用整型 而用了 字符串占位符  所以提示参数格式 错误

原文地址:https://www.cnblogs.com/lanymy/p/2322463.html