How To Get Last Three from List

How to get last three from list,
example i have the list: listA=new list(of string) from {“A123”,“B222”,“C888”,“D789”,“E999”}

i want to get last three from listA, result: C888, D789 and E999

thank you

Hi,

Can you try the following expression?

listA.Skip(listA.Count-3).ToList

Regards,

3 Likes

its worked, thank you so much @Yoichi

1 Like