LINQ - into Keyword

Use into keyword in LINQ query to form a group or to continue a query after a select clause.

Example: into keyword in LINQ
var teenAgerStudents = from s in studentList
    where s.age > 12 && s.age < 20
    select s
        into teenStudents
        where teenStudents.StudentName.StartsWith("B")
        select teenStudents;

In the above query, the 'into' keyword introduced a new range variable teenStudents, so the first range variable s goes out of scope. You can write a further query after the into keyword using a new range variable.

The 'into' keyword in VB.Net used for grouping purposes.

Example: into keyword in LINQ VB.Net
Dim groupQuery = From s In studentList
                 Group By s.Age Into Group
Want to check how much you know LINQ?