I have a text file that I need to replace the 3rd line of data in..

What is the best way to do this?

For example:

I have c:\testfile.txt

It reads:

line 1
line 2
line 3
line 4

I want to change it to read:

line 1
line 2
New line 3
line 4

How can I do that?

Thanks!