“System.Collections.Generic.IEnumerable<TestDAL.HistoryData>”不包含“ToList”的定义

来源:互联网 发布:安卓开发java基础书 编辑:程序博客网 时间:2024/06/07 06:02

错误 2 “System.Collections.Generic.IEnumerable<TestDAL.HistoryData>”不包含“ToList”的定义,并且找不到可接受类型为“System.Collections.Generic.IEnumerable<TestDAL.HistoryData>”的第一个参数的扩展方法“ToList”(是否缺少 using 指令或程序集引用?)J:\太阳能近期\政府小区即时通信\testXML\TestDAL\Program.cs101 74 TestDAL


这个错误是因为没有“using System.Linq;”,导则IEnumerable不能使用拓展方法“ToList”。

原创粉丝点击