title: c# Write DataTable Rows in txt File
body: <p>I have for like 40 rows on My <code>DataTable</code> Displayed in a <code>DataGridView</code>
  i'm confused why my method Saves Only <code>One Row</code> in the <code>TextFile</code> : </p>
  
  <pre><code>    private void SaveBtn_Click(object sender, EventArgs e)
      {
          String outputFile;
          List&lt;String&gt; ListData = new List&lt;String&gt;();
          using (SaveFileDialog sfd = new SaveFileDialog())
          {
              sfd.Filter = "Txt File|*.Txt";
              if (sfd.ShowDialog() != DialogResult.OK)
                  return;
              outputFile = sfd.FileName;
          }
  
          DataTable tb = pw.SavedInfo(User_info.UserID);
  
          for (int i = 0; i &lt; tb.Rows.Count; i++)
          {
             ListData.Add("Name==&gt; " + tb.Rows[i][1].ToString() + "  LastName ==&gt; " + tb.Rows[i][2].ToString() + "  Email ==&gt; " + tb.Rows[i][3].ToString() );
  
          }
  
          foreach (String s in ListData)
          {
              using (TextWriter Tw = new StreamWriter(outputFile))
              {
                  Tw.WriteLine(s);
              }               
          }
      }
  </code></pre>
  
  <p>Did i missed something ? cause it was a really long day to keep being focused</p>