我对这个问题很困惑,无法理解。在Enumerable
文档中,我读到了这样的内容:
实现System.Collections.Generic.IEnumerable接口的类
一些方法,例如Select()
返回IEnumerable<TSource>
,我们可以在使用它之后从其他方法中使用Where()
。例如:
names.Select(name => name).Where(name => name.Length > 3 );
但是Enumerable没有从IEnumerable<T>继承,IEnumerable<T>也不包含Select()、Where()等方法……
我错了吗?还是有任何原因呢?