There is an easy way if you want process not very large text file:
RichTextBox textBox = new RichTextBox()
{
Text = File.ReadAllText(fileName),
WordWrap = false
};
string firstLine, secondLine;
firstLine = textBox.Lines[0];
secondLine = textBox.Lines[1];
textBox.Lines[0] = secondLine;
tectBox.Lines[1] = firstLine;
After all write the textBox.Text on your file.
Is that what you asked?