for (int i = 0; i < temp.Length; i++){sb.Append(temp[i]);}comm.CommandText = sb.ToString();}}if (comm.Connection.State != ConnectionState.Open){comm.Connection.Open();}return comm.ExecuteReader(CommandBehavior.CloseConnection);}调用的时候类似:ExecuteReaderParams(comm, "select * from xx where id=? and name=?",id,name);