我的数据集包含两个表,我需要分割FirstTable.Row2 / SecondTable.Row5
答案 0 :(得分:0)
假设类型相同且划分可以接受......我理解你的问题:
DataSet ds = GetMyData();
// You should check here for there being at least 2 tables in the DataSet
// and that Table 1 has at least 2 rows and Table 2 has at least 5 rows.
var result =
ds.Tables[0].Rows[1]["YourField"] / ds.Tables[1].Rows[4]["YourOtherField"];