Append throwing an exception
<p>I was trying to create a fixed lenght(left aligned) batch file with the below code.</p>

<p>when i use Append it's throwing exception "is a method but used like a type".</p>

<pre><code>            string batFilePath = @"c:\mockforbat.bat";
        if (!File.Exists(batFilePath))
        {
            using (FileStream fs = File.Create(batFilePath))
            {
                fs.Close();
            }
        }

        //write
        using (StreamWriter sw = new File.AppendText(batFilePath))
        {
            string a = String.Format("{0,-24}{1,-5}{2,5}", "CostCenter", "CostObject", "ActivityType");
            sw.WriteLine(@a);

        }
        Process process = Process.Start(batFilePath);
        process.WaitForExit(); 
</code></pre>

<p>Please some one correct me what i did wrong here ?</p>
