title: unable to overwrite file using streamwriter despite append= false, without closing file
body: <p>using C# VS 2010, windows forms.
  My goal is to open and close the file only once and "overwrite" it multiple times. I never want to append. The reason for opening and closing the file once is I want the write operation to be fastest.</p>
  
  <p>I am passing append = false in streamwriter constructor but it still appends and not overwrite.</p>
  
  <pre><code>private void testSpeed()
  {
  StreamWriter sw1 = new StreamWriter(@"d:\logfolder\overwrite.txt", false);
              sw1.AutoFlush = true;
              for (int i = 0; i &lt; 5000; i++)
              {               
                      sw1.Write(i);            
              }
              sw1.Close();
  }
  </code></pre>
  
  <p>My expected output is the file should only have 4999
  but I am getting this instead
  0123456789101112131415161718192021222324252627282930313233...............
  all the way to 4999</p>
  
  <p>this file already exists
  d:\logfolder\overwrite.txt</p>
  
  <p>Any ideas what I Am doing wrong?</p>