title: How to write and save a file multiple times with StreamWriter in C#?
body: <p>I'm trying to open a file, rewrite it, save it and close it for multiple times in my app, and I observed a strange behavior</p>
  
  <p>I open the file with:</p>
  
  <pre><code>System.IO.StreamReader file = new System.IO.StreamReader(filePath);
  </code></pre>
  
  <p>Write it with this:</p>
  
  <pre><code> using (System.IO.StreamWriter file = new System.IO.StreamWriter(filePath)) {
              file.WriteLine(myString);
              file.Close();
          }
  </code></pre>
  
  <p>But the file does not change until I close the app, why is this happening ?</p>
  
  <p>I checked the file myself and it content doesn't change just after the app is closed</p>