title: how to clear txt file when you exit your application c#
body: <p>this is my code to fill my txt file, and show in my application.</p>
  
  <pre><code>StreamWriter file = new StreamWriter("opslag_kentekens",true);
  string opslag_kentekens = textBox1.Text;
  file.WriteLine(opslag_kentekens);
  file.Close();
  
  label20.Text = File.ReadAllText("opslag_kentekens");
  </code></pre>
  
  <p>My question is: how do i clear my txt file when i exit my application?           </p>