Bonnie_K
asked on
Using C# open text file and add text to the beginning and end of each line
Hi,
I want to open a text file then add an open quotation mark to the beginning of each line and a quotation mark and a plus sign to the end of each line.
I am trying to do this in C# but cannot find any good examples.
Thanks for any help,
Bonnie
I want to open a text file then add an open quotation mark to the beginning of each line and a quotation mark and a plus sign to the end of each line.
I am trying to do this in C# but cannot find any good examples.
Thanks for any help,
Bonnie
I suggest to read file in for/while read all lines into array and then with regular expressions add at the start and end of line what you want, then write changes back to file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much, works perfectly!