StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 id from " + databaseprefix + "channel"); strSql.Append(" where name=@name ");
StringBuilder的Append()方法会比+=效率高,StringBuilder比StringBuffer效率略高
+=,占资源的空间和时间
StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 id from " + databaseprefix + "channel"); strSql.Append(" where name=@name ");
StringBuilder的Append()方法会比+=效率高,StringBuilder比StringBuffer效率略高
+=,占资源的空间和时间