title: StreamWriter limit in C# in text file
body: <p>I have an array list which contains 100 lines.
  When i try to export it into a text file (txt), the output is only 84 lines and it stops in the middle of the 84th line.
  When I looked at the file size it showed exactly sharp 4.00KB as if there is some kind of a limit to the stream writer. I tried using different parameters etc. but it kept happening.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>FileStream fs = new FileStream(path, FileMode.Create);
  
          StreamWriter sw = new StreamWriter(fs);
          ArrayList chartList = GetChart(maintNode);
  
          foreach (var line in chartList)
          {
              sw.WriteLine(line);
          }
  
          fs.Close();
          Console.WriteLine("Done");
  </code></pre>
  
  <p>Thanks for the help!</p>