---
title: "Use Select Operator in linq."  
description: "Use Select Operator in linq."  
author: "Norman Reedus"  
published: 2016-03-20  
updated: 2016-03-20  
canonical: https://www.mindstick.com/forum/34066/use-select-operator-in-linq  
category: "linq"  
tags: ["linq"]  
reading_time: 2 minutes  

---

# Use Select Operator in linq.

We want to use [Select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) [Operator](https://www.mindstick.com/blog/144/union-intersection-and-except-operator-in-sql-server) in linq. How to do this please help me.

## Replies

### Reply by Anonymous User

The Select operator always returns an IEnumerable collection which contains elements based on a transformation function. It is similar to the Select clause of SQL that produces a flat result set.

```
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Prototype{    class Example    {        static void Main()        {
            IList<Employee> empList = new List<Employee>() {     new Employee() { ID = 1, EmpName = "Rohit", Age = 13 } ,    new Employee() { ID = 2, EmpName = "Monu",  Age = 21 } ,    new Employee() { ID = 3, EmpName = "Mohsan",  Age = 18 } ,    new Employee() { ID = 4, EmpName = "Sohel" , Age = 20 } ,    new Employee() { ID = 5, EmpName = "Arun" , Age = 20 } ,    new Employee() { ID = 6, EmpName = "Karan" , Age = 25 } };
            var selectResult = from s in empList                               select new { Name = "Mr. " + s.EmpName, Age = s.Age };            foreach (var item in selectResult)                Console.WriteLine("Student Name: {0}, Age: {1}", item.Name, item.Age);            Console.ReadLine();        }    }    class Employee    {        public int ID { get; set; }        public string EmpName { get; set; }        public int Age { get; set; }    }}
```

![Use Select Operator in linq.](https://www.mindstick.com/mindstickforums/887f4a90-f98d-49b7-b1e6-c6bec952963b/images/e196fe07-a354-497c-9d94-cce7434006cd.png)


---

Original Source: https://www.mindstick.com/forum/34066/use-select-operator-in-linq

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
