SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

Computer Science AQA A level

» Start this Course
(Practice similar questions for free)
Question:

How would you acess the eleemts of a text file

Author: Will Parker



Answer:

String filename = "FILENAME.txt"; StreamReader sr = new StreamReader(filename); while ((line = sr.ReadLine()) != null) { line = each line of text file } sr.Close();


0 / 5  (0 ratings)

1 answer(s) in total