title: How to read from database and write into text file with C#?
body: <p>How to read from database and write into text file?</p>
  
  <p>I want to write/copy (not sure what to call) the record inside my database into a text file. One row record in database is equal to one line in the text file. I'm having no problem in database.</p>
  
  <p>For creating text file, it mentions <code>FileStream</code> and <code>StreamWriter</code>. Which one should I use?</p>