how to add some text to existing text file without erasing current data?

I'd recommend that you check out the following search for many links related to the process you're looking for :twisted:

What you're looking for is the Append file access mode which opens an existing file for writing but places new content at the end of the file instead of overwriting from the beginning. For this you can use the standard filestream method of accessing the file and utilize the append access mode or you can use the File.AppendText method depending on your needs.

Hope this helps :)

commented: google == friend :D +3

I'd recommend that you check out the following search for many links related to the process you're looking for :twisted:

What you're looking for is the Append file access mode which opens an existing file for writing but places new content at the end of the file instead of overwriting from the beginning. For this you can use the standard filestream method of accessing the file and utilize the append access mode or you can use the File.AppendText method depending on your needs.

Hope this helps :)

thanx man :)
its really helpful

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.