I have a textfile which contains data like this :

Record 1 
Record 2 
Desc 1 
Record 3 
Record 4 
Desc 1 
Desc 2 

I want to rewrite the textfile

Record 1 
Record 2 Desc 1 
Record 3 
Record 4 Desc 1 Desc 2 

how can I accomplish this?

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
Hi,
if you know which descriptions (Desc n) belong to which Records, then you just read line for line, assigning the Descriptions to the Record(s) in question  (possibly a string array) and then write them out, each (string) array to a single line in your text file.
Answered 02/06/2016 by: Pressanykey
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity