Question: This should be very simple but I searched and couldn't find a similar linq example. 

I have a function below.

```
viewModel.SLGDeptSalesList = viewModel.SLGDeptSalesList.Where(
    (value, index) => index == 0).ToList();

```

It returns an index within the sales list. 

I need to customize it to return multiple hard coded index's such as 1,3,4,6. 

How can I use linq to do this in one line? 

Thanks a bunch!

Answer: 
You can do a `Select` on your hardcoded list of indices, to transform them into corresponding elements in the `viewModel.SLGDeptSalesList` list:

```
viewModel.SLGDeptSalesList = new List<int> { 1, 3, 4, 6 }.Select(x => viewModel.SLGDeptSalesList[x]).ToList();

```
If your indexes are hardcoded in a list then you can just use the .Exists() within your Where. but if they are just 

```
   var indices = new List<int>(){1,3,4,6};
   viewModel.SLGDeptSalesList = viewModel.SLGDeptSalesList.Where((value, index) => indices.Exists(index)).ToList();

```