stringBuilder,完全可以替代string,最主要的是它的效率高
//必须先实例化一个
stringBuilder sBuilder = new stringBuilder();
//您可以拼接执行SQL语句,易于阅读
sBuilder.Append("select * from tb1");
sBuilder.Append("where id=1");
上面同等于
strng sBuilder = "select * from tb1 where id=1";
stringBuilder,完全可以替代string,最主要的是它的效率高
//必须先实例化一个
stringBuilder sBuilder = new stringBuilder();
//您可以拼接执行SQL语句,易于阅读
sBuilder.Append("select * from tb1");
sBuilder.Append("where id=1");
上面同等于
strng sBuilder = "select * from tb1 where id=1";
转载于:https://www.cnblogs.com/huangtu/archive/2013/02/04/2891470.html