AppendFormat System.FormatException: 输入字符串的格式不正确

 sbTemp.AppendFormat(" public Model_{0} GetModel(Model_{1} model)\r\n}", tableName, tableName);
将字符串最后的 }去掉
改为:即可
 sbTemp.AppendFormat(" public Model_{0} GetModel(Model_{1} model)\r\n", tableName, tableName);

原文地址:https://www.cnblogs.com/gossip/p/2217863.html