9
Answers

Using Files

Richard Brennan

Richard Brennan

13y
1.4k
1
Hi

Im totaly new to c#.

Q1: If i had a file like

Richard,Brennan
Jane,Smith
Paul,Grain

etc and a read each line 1 at a time, I assume that the whole line,  'Richard,Brennan' is read into the IO stream.
Whats the best way to get each name seperated into their own string?

(Right I have found split() and used it OK so ignore this one.  Pls look at Q2.


Q2: How do i delete a specific line from a txt file?
And when i close the IO stream - does it save it and remove the white space?

Example, remove jane from above and close the gap.
Answers (9)
Next Recommended Forum