I have seen the following code used in other posts and it seems to be accepted as an answer but when I use it, it doesn't work correctly. Its purpose is to pull the last three lines of a text file and output them to the user.
I do not receive any build errors, but the console doesn't output the contents of the given .csv.
List<string> test = File.ReadAllLines("test.csv").Reverse().Take(3).Reverse().ToList();
Console.WriteLine(test);
EDIT:
This posted without the full post.
The contents of the csv are numbers 0-10 and I need to pull the last three numbers of the file upon request.
For testing purposes, the csv is currently laid out:
1
2
3
4
5
I want to pull the numbers in the order of 3, 4, 5.