我收到这个错误
"Error 8 Cannot implicitly convert type 'System.Collections.Generic.List<System.Data.DataRow>' to 'System.Collections.Generic.List<DataRow>'
”
产生问题的代码行是这样的......
List<DataRow> dRowList = target.SearchFor(searchPhrase, searchField, matchesAny);
target.SearchFor 返回一个 DataRow 列表。我不知道出了什么问题。
最佳答案
试试
var dRowList = target.SearchFor(searchPhrase, searchField, matchesAny);
关于C# 出现错误。无法从 System.Data.DataRow 隐式转换为 DataRow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16731928/