Q:

Open File and Show Contents

I am using a streamwriter to write a file. Something like this:
using (StreamWriter sw = new StreamWriter(@"path\filename.txt", false))
{}

I am already writing to the file. What I want to do now is to open the text file automatically in Windows so that the user can actually see the contents of the file. Any help would be appreciated. 

A:

As suggested by Hans Passant, use Process.Start():
Process.Start(@"path\filename.txt");

This will open the text file in the default text file application.

