为什么我不能在公共抽象类的方法中使用Linq Where子句?

Mat*_*olf 2 c# linq dictionary list where

我有以下构造,我不能使用该Where子句作为linq查询的一部分,我想知道为什么:

public abstract class Foo : IFoo
{
    public Foo(List<int> testCollection)
    {
        var result = testCollection.Where(.......).Select(.....);

    }
}
Run Code Online (Sandbox Code Playgroud)

Intellisense不识别该Where子句,我也得到编译错误.这与我试图在抽象类中使用它有关吗?我使用.Net 4.5,我可以在常规类中构建Linq查询.

Raw*_*ing 10

你有没有using System.Linq;在C#文件的顶部?:)