StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 id from " + databaseprefix + "channel"); strSql.Append(" where [email protected] ");
StringBuilder的Append()方法会比+=效率高,StringBuilder比StringBuffer效率略高
+=,占资源的空间和时间
时间: 2024-12-11 13:30:19