public int[] DL_Count_Bind()
{//统计分类数
int[] sumCount_Class=new int[num];
string s_sumCount_Class;
for(int i=0;i<num;i++)
{
string sSql="SELECT COUNT(*) AS Counts FROM Books a,BookClass b WHERE b.BookClass_Name='"+sBookClassName[i]+"' AND a.BookClass_ID=b.BookClass_ID";
SqlConnection sqlcon=new SqlConnection(strCnn);
SqlDataAdapter sqlda=new SqlDataAdapter(sSql,sqlcon);
DataSet ds=new DataSet();
sqlda.Fill(ds,"BookClass");
s_sumCount_Class=ds.Tables["BookClass"].Rows[0]["Counts"].ToString();
sumCount_Class[i]=Convert.ToInt32(s_sumCount_Class);
sqlcon.Close();
}
return sumCount_Class;
}
为什么返回值后都返回System.Int32,如果用return sumCount_Class[0]却能返回正确的第一个值
麻烦各位了
[求助]数组返回值时,为什么都返回System.Int32??????????