System IO C# by API

using System;
using System.IO;
public class MainClass
{
  public static void Main() 
  {
    FileStream outStream = File.Create("c:\\TextTest.txt");
    StreamWriter sw = new StreamWriter(outStream);
    sw.WriteLine("This is a test of the StreamWriter class");
    sw.Flush();
    sw.Close();
    StreamReader sr = new StreamReader("c:\\TextTest.txt");
    string FirstLine;
    FirstLine = sr.ReadLine();
    Console.WriteLine(FirstLine);
    sr.Close();
  }
}