How to write content in a text file at the end of each line

Posted by saravanan on Stack Overflow See other posts from Stack Overflow or by saravanan
Published on 2010-05-25T14:16:32Z Indexed on 2010/05/25 14:21 UTC
Read the original article Hit count: 412

Filed under:

Hi,

I am having one text file which contain following kind of data.

"3P","Smith","Richard","3 Point Promotions","3P","[email protected]","IDA","Yes",,,,0,4,5,83.33,10,
"A1","Ernest","Amy","TAKE 1 Promotional Products","LCOOK","[email protected]","IDA","Yes",,,,0,6,7,,0,
"A2","Derek","Eaton","Advertising Edge Promotions","AE","[email protected]","IDA","Yes",,,,0,8,8,,10,
"AAA","Abercrombie","Jerry","AAA Specialty Wholesale Inc","AAA","[email protected]","IDA","Yes",,,,0,9,9,,10,
"AAP","Halberstam","Mendy","All About Promotions","AAP","[email protected]","IDA","Yes",,,,0,10,10,,12,

Each of them are separate line.Now i want add another column in each like this

"3P","Smith","Richard","3 Point Promotions","3P","[email protected]","IDA","Yes",,,,0,4,5,83.33,10,**96**
"A1","Ernest","Amy","TAKE 1 Promotional Products","LCOOK","[email protected]","IDA","Yes",,,,0,6,7,,0,**97**
"A2","Derek","Eaton","Advertising Edge Promotions","AE","[email protected]","IDA","Yes",,,,0,8,8,,10,**98**
"AAA","Abercrombie","Jerry","AAA Specialty Wholesale Inc","AAA","[email protected]","IDA","Yes",,,,0,9,9,,10,**99**
"AAP","Halberstam","Mendy","All About Promotions","AAP","[email protected]","IDA","Yes",,,,0,10,10,,12,**100**

How i read content in line by line.And also how to write another value in same text file at each line.Please send solution for this problem.I am waiting for your reply.Thanks for reply. -Saravanan

© Stack Overflow or respective owner

Related posts about winforms