July 2015
Intermediate to advanced
1300 pages
87h 27m
English
To understand why LINQ is revolutionary, the best way is to begin with some code examples. In the next chapters, you see a huge quantity of code snippets, but this chapter offers basic queries to provide a high-level comprehension. Imagine you have a Person class exposing the FirstName, LastName, and Age properties. Then, imagine you have a collection of Person objects, of type List(Of Person), called People. Last, imagine you want to extract from the collection all Person instances whose LastName property begins with the letter D. This scenario is performed via the following code snippet that uses a LINQ query:
' "People" is of type List(Of Person)Dim peopleQuery = From pers In People Where ...