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
You can use Cast or OfType to get a generic version of an IEnumerable that fully supports LINQ.
Eg.
IEnumerable objects = ...;
IEnumerable strings = objects.Cast();
Or if you don't know what type it contains you can always do:
IEnumerable
If your non-generic IEnumerable contains objects of various types and you are only interested in eg. the strings you can do:
IEnumerable strings = objects.OfType();