I've been having some problems extracting particular lines in a txt file. I'm using the file to store user names for a login program.
The program will know what line to go to in the text file but I don't know how to actually get the wanted line out and put the resulting string into a variable.
Code I'm using to pull file into a variable is:
string usernameFile = System.IO.File.ReadAllText(@"Usernames.txt");
My real problem is that code two lines below doesn't work in my visual studios community version 2017:
File.ReadLine
I don't know if I need to install something else onto my visual studios but any method to be able to read a particular line of a txt file will be fine.