DataSet ds = new DataSet();
int tablecount = ds.Tables.Count;//ds的table总数
int dataCount = ds.Tables["TableName"].Rows.Count;//table中的纪录总数
DataSet ds=new DataSet()
int count;
foreach(DataTable dt in ds.Tables)
{
count+=dt.Rows.Count
}
获得某一行的值
textBox.Text = DataSet1.Tables["mytable"].Rows[1][1].ToString();