我想知道如何遍历下面的查询并将值存储在不同的变量中 下表向我们展示了查询中输出的数据,并将每个值存储在 str1、str2、str3 中
sortByColumn | numberOfRow | coloumnsInExcel
8 | 10 | 10
var queryAD1 = (from m in configurationData.AsEnumerable()
where m.Field<String>("QuestionStartText") == question && m.Field<String>("slideNo") == Convert.ToString(slideNumber)
group m by m.Field<String>("slideNo") into A123Group
select new {
sortByColumn = A123Group.Select(sorted => sorted.Field<String>("SortByColumn")).Distinct(),
numberOfRow = A123Group.Select(sorted => sorted.Field<String>("NoOfRows")).Distinct(),
coloumnsInExcel = A123Group.Select(sorted => sorted.Field<String>("ColumnInExcel")).Distinct(),
});