I have a test file that contains
1,2,3
2,3,4
5,6,7
I want to insert this into the first line: A,B,C
So that I get:
Here is a link that explains how to use the TextReader (StreamReader) and TextWriter (StreamWriter) classes in C#.
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=132
Though this is specific to C#, the approach could be relatively the same across many languages.
(Note: There are several ways to do this, this is just one idea that comes quickly to mind.)
Essentially, you could read in the contents of your text file into a string, find the beginning of that string, write your information (A,B,C with your carriage returns or line feeds) and then write that information back out into the text file overwriting the original contents and save.