日期:2014-05-20  浏览次数:20699 次

IEnumerable <>的问题
IEnumerable<V_CompanyByM> m= new IEnumerable<V_CompanyByM> ;


貌似不可以求教正确写法,谢过

------解决方案--------------------
接口不能实例化

或许你能将这接口指向一个List引用等

IEnumerable<V_CompanyByM> m = new List<V_CompanyByM>();
------解决方案--------------------
探讨

接口不能实例化

或许你能将这接口指向一个List引用等

IEnumerable<V_CompanyByM> m = new List<V_CompanyByM>();

------解决方案--------------------
1楼正解

IEnumerable 接口

公开枚举器,该枚举器支持在非泛型集合上进行简单迭代。

http://msdn.microsoft.com/zh-cn/library/system.collections.ienumerable.aspx

------解决方案--------------------
接口不能这样用的,new一个实现了IEnumerable<T>的类型