© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
10 replies
Eguzki

System.Linq and TakeLast() not defined.

Hi.
I am going through the book Head First C# and in chapter 9 when they introduce LINQ I am getting a weird error. I tried to google my problem but I couldn't find a solution.

The book has me calling the method TakeLast() on a list. However Visual Studio is telling me that method is not defined. All I could find on the internet is to make sure I am using System.Linq. Which I am.

I made sure my project properties is using the latest version of C#.

I am really lost about this. Was TakeLast() removed ?
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Linq Concat not defined?
C#CC# / help
4y ago
✅ System.InvalidOperationException: The LINQ expression
C#CC# / help
2y ago
❔ System.Linq.Expressions custom expression
C#CC# / help
3y ago
Build ref return with System.Linq.Expressions
C#CC# / help
4y ago