954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to write a text line in a text file

I have a file named abc.txt. I want to insert the text line at line number 10 such that the content of line number 10 must be in line 11 and so on.
How do I, do this opeartion ?

sowmyask
Newbie Poster
6 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

Treat with array of strings, and insert into this array and when you need to reflect this changes use foreach (string s in urArrayOfStrings) { Write in your txt file}

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You