Click to See Complete Forum and Search --> : Can Linq be used to query a Generic List<T>?


purpleflash
November 7th, 2008, 02:03 PM
I have a class which is basically a List<T>, where the objects in the list are instances of another class of mine, mostly strings but also a few DateTimes and long variables.

Can I run Linq queries against this generic list, and have it search through the objects in the list?

Thanks.

Running .Net 3.5SP1, VS2008 Express

TheCPUWizard
November 7th, 2008, 03:18 PM
LINQ can be used with anything that supports IEnumerable.