What is Select() in LINQ?

Easy0-2 Years

Select()

Select() projects data into another form.

Example

var names = employees
    .Select(x => x.Name);

Output

Returns only employee names.

Interview Tips

Select() is used for Projection.