title: Problem outputting text into a text file from c#
body: <p>I am having problems getting the output of this event to go to a text file, I think it might be something to do with the "File" value</p>
  
  <pre><code>        private void button1_Click(object sender, EventArgs e)
          {
  
              var file = File.AppendText(@"c:\output.txt");
  
              StreamReader sr = new StreamReader(@"c:\filename.txt");
              Regex reg = new Regex(@"\w\:(.(?!\:))+");
              List&lt;string&gt; parsedStrings = new List&lt;string&gt;();
              while (sr.EndOfStream)
              {
                  parsedStrings.Add(reg.Match(sr.ReadLine()).Value);
              }
  
          }
      }
  }
  </code></pre>