Questions tagged «asqueryable»

3
用LINQ查询DataColumnCollection
我正在尝试对DataTable的Columns属性执行简单的LINQ查询: from c in myDataTable.Columns.AsQueryable() select c.ColumnName 但是,我得到的是: 找不到源类型“ System.Linq.IQueryable”的查询模式的实现。找不到“选择”。考虑明确指定范围变量“ c”的类型。 如何使DataColumnCollection与LINQ配合使用?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.