TextReader how to read any line I want?

Apr 24 2014 6:38 AM
I want to be able to read a specific line of a txt file

Here's my code

using (TextReader reader = File.OpenText("File.txt"))
            {
                Text = reader.ReadLine();
                Console.WriteLine(Text);
                labelRead.Text = Text;
            }

This reads the first line of the txt file. How do I make it read another line. Let's say, line 3?

Answers (1)