From the course: .NET Essentials: Working with LINQ

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

What sources revisited

What sources revisited

- [Instructor] I would like to take a minute to revisit the possible sources of a query in LINQ. Earlier in this chapter, I ran this example. And this shows you all of the types that implement IEnumerable that are inside this library, the "msCorLib". So we're seeing this Collection, and it's the Dictionary, and the List, and some other items. So, I want to take a look and show you some more samples using some of these other types that implement this interface. So we'll look here, Whatsources at 6A. We've already seen this one. List of T. So I won't go back and show you that. And we've briefly looked at Array, but I want to spend another minute talking about that. Remember that I said, LINQ to objects works with types that implement IEnumerable<T>. Now the Array type in .NET does not implement IEnumerable<T>. It only implements Ienumerable. But you can still run LINQ queries on Array. And that's because…

Contents