Ienumerable Book: Int in
Ienumerable Book: Int in
that satisfy a
certain condition. The following example creates a collection of books containing the word "our" in the title with price less
than 500. From the array of books are selected records whose title contains the word "our", price is compared with 500, and
these books are selected and returned as members of a new collection. In ''where <<expression>>'' can be used a valid C#
boolean expression that uses the fields in a collection, constants, and variables in a scope (i.e., price). The type of the
returned collection is IEnumerable<Book> because in the ''select <<expression>>'' part is the selected type Book.
Hide Copy Code
Hide Copy Code