Reputation: 7254
I have the following construct and I cannot use the Where
clause as part of a linq query and I wonder why:
public abstract class Foo : IFoo
{
public Foo(List<int> testCollection)
{
var result = testCollection.Where(.......).Select(.....);
}
}
Intellisense does not recognize the Where
clause and I also get a compile error. Is that related to me trying to use it within an abstract class? I use .Net 4.5 and I can construct Linq queries in regular classes.
Upvotes: 2
Views: 2003