I have a class that implements IEnumerable, but doesn\'t implement IEnumerable. I can\'t change this class, and I can\'t use another class
IEnumerable
Yes it can. You just need to use the Cast function to get it converted to a typed IEnumerable. For example:
Cast
IEnumerable e = ...; IEnumerable e2 = e.Cast();
Now e2 is an IEnumerable and can work with all LINQ functions.
e2