how to write a text line in a text file

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 6
Reputation: sowmyask is an unknown quantity at this point 
Solved Threads: 0
sowmyask sowmyask is offline Offline
Newbie Poster

how to write a text line in a text file

 
0
  #1
May 10th, 2008
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 ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: how to write a text line in a text file

 
0
  #2
May 10th, 2008
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}
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC