你知道為什么這不起作用嗎?List<Tuple<DateTime, DateTime, double, double>> newlist = from a in this.EmployeeActivityBook where a.Item1 >= start && a.Item1 <= end select a;我收到此錯誤:
1 回答
ABOUTYOU
TA貢獻1812條經(jīng)驗 獲得超5個贊
根據(jù)您的錯誤,您當前正在返回一個IEnumerable<T>而不是一個List<T>。
您只需要調(diào)用.ToList()您的查詢。
List<Tuple<DateTime,DateTime,double,double>> newlist =
(from a in this.EmployeeActivityBook
where a.Item1 >= start && a.Item1 <= end
select a).ToList();
- 1 回答
- 0 關(guān)注
- 153 瀏覽
添加回答
舉報
0/150
提交
取消
