C# – Select bottom N from Generic List

c++linq

I have a generic list of integer and it contains random numbers. How would I select the last n elements from the list using LINQ?

I know can use myList.GetRange(index, count) to get the last n elements from the list. Is there a way to do it in LINQ?

THanks

regards,
Balan

Best Solution

var count = myList.Count;

myList.Skip(count-n)

Update:

removed redundant Take.