X x_nick2001 New member Joined Oct 26, 2005 Messages 3 Programming Experience 3-5 Oct 28, 2005 #1 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
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
JuggaloBrotha VB.NET Forum Moderator Staff member Joined Jun 3, 2004 Messages 4,530 Location Lansing, MI; USA Programming Experience 10+ Oct 28, 2005 #2 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 Upvote 0 Downvote
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