由网友(庸俗且无趣)分享简介:在 C# 中,是否可以通过简单指令(无 LINQ,无 For cicle)从 DataSet 的所有行中获取特定列的所有值?In C#, is it possible to get all values of a particular column from all rows of a DataSet with a...
在 C# 中,是否可以通过简单指令(无 LINQ,无 For cicle)从 DataSet 的所有行中获取特定列的所有值?
In C#, is it possible to get all values of a particular column from all rows of a DataSet with a simple instruction (no LINQ, no For cicle)?
推荐答案
仅通过遍历行,如 Utaal 在这个答案中注明.
您可能期望 DataTable.DefaultView.RowFilter
会支持分组,但它不支持(它主要提供 Where
子句的等效功能,以及一些基本的聚合 - 虽然不是简单的分组).
You might expect that the DataTable.DefaultView.RowFilter
would support grouping, but it does not (it mainly offers the equivalent functionality of a Where
clause, with some basic aggregations - though not simple grouping).
相关推荐
最新文章