title: how to use StreamWriter class properly?
body: <p>I am using <code>StreamWriter</code> class for file operations, are there any problems in this code that I am not seeing? </p>
  
  <p>Such as do I need to put it into a <code>try catch finally</code> block? </p>
  
  <pre><code>StreamWriter sr = new StreamWriter(streamFolder);
  sr.Write(details);
  
  File.SetAttributes(streamFolder, FileAttributes.Hidden);
  sr.Close();
  </code></pre>