我试图区分多个列并从datatable获取数据行.但得到错误.
Dim query As IEnumerable(Of DataRow) = (From row As DataRow In SourceTable.AsEnumerable() _ Select row.Field(Of String)("ColumnName1"), row.Field(Of String)("ColumnName2") ).Distinct()
低于错误:
Unable to cast object of type 'd__7a`1[System.String]' to type 'System.Collections.Generic.IEnumerable`1[System.Data.DataRow]'.
我想要另一个基于SourceTable给定列的不同行的数据表.