> For the complete documentation index, see [llms.txt](https://docs.tailent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tailent.com/scripting-utility-classes/common-scripts-repository/c-scripts-repository/linq-filtering.md).

# LINQ Filtering

Create a list(List\<int> in the example below) and populate it in order to use said list as an example. Then apply two queries, one to filter the numbers bigger than 5 and the second one to order the items in a descending order, converting the result to a list.

```csharp
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(-15);
list.Add(21);
list.Add(5);
list.Add(9);
list.Add(123);

var integerList = list.Where(x => x > 5);
var integerList = list.OrderByDescending(x => x).ToList();
```
