Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个数据表,大约有 100 行。我想对单元格中的一个值的数据表进行选择查询,以获取单元格值匹配的所有行。
可能就像您想要的 DataTable.Select 方法一样简单...
DataTable.Select 方法(字符串)
var query = (from x in dataTable.Rows.OfType<DataRow>() where x.Field<string>("columnName") == "someValue" select x).ToList();