Open existing text file adn write lines at the beginning of it

x_nick2001

New member
Joined
Oct 26, 2005
Messages
3
Programming Experience
3-5
I have a text file "C:\cfgTemp.txt" and all I want is a way to write lines at the beginning of it, how we do this???

tx
 
first you would need to open the file (System.IO.StreamReader) read all of the contents into a string variable, close it

open the file (System.IO.StreamWriter) write whatever new stuff to the file, write that string variable to it, close it

and there ya go, if ya need help doing this, give it a try first then post the code you've started and we can help ya from there
 
Back
Top