Reading lines on a text file help
how would you read the next line in a text fine? like say my text file had 5 lines of text, how would u read the first line and then move on to the next and read that?
14 Replies
would you be using stream reader? could i see an example of this?
Are you reading all the lines, or just some?
If reading all, I'd probably use
string[] lines = File.ReadAllLines(...)
i want to read one line at a time
so first read the first line, check for a value, then move onto the second, check for another value that i need etc and so on
then you'll need a reader
i’m not sure how to do it
could u possible show me how?
ooo i see so this reads each line individually?
each time you call
ReadLine()
it reads one line and returns itoh i see, why is var reader equal to blank?
wdym?
its not
ohh nvm oops
ok i see!
ok thank you!!
ooo i see
ok this’ll help thanks a ton!
are you still doing the dog/owner thing?