【发布时间】:2013-07-02 09:04:53
【问题描述】:
我正在尝试动态绑定树视图。
我在 Google 中搜索并找到了一些不错的链接。
当我尝试在我的系统中运行时,它会显示类似这样的错误
'System.Collections.Generic.List<ActualEstimatation.frmEstimate.ItemInfo>' does not contain a definition for 'Where' and no extension method 'Where' accepting a first argument of type 'System.Collections.Generic.List<ActualEstimatation.frmEstimate.ItemInfo>' could be found (are you missing a using directive or an assembly reference?)
这些链接是 How to dynamically populate treeview (C#)
和 sga101 的解决方案 How to insert Datas to the Winform TreeView(C#) in effitive coding?
我在谷歌上搜索解决了上述问题,但没有找到任何解决方案。
请帮我解决这个问题。
提前致谢
【问题讨论】:
-
您使用的是 .net framework 3.5 或更高版本吗?
-
是的,我使用的是 .net Framework3.5
-
Enumerable.Where() 是一个扩展方法。将
using System.Linq;放在源代码文件的顶部。