title: Parsing a text file into List with minimal memory consumption
body: <p>I have a text file that has 1.000.000 lines like these:</p>
  
  <pre><code>texta   text1   text#
  text%   text9   textx
  text'   text^   text3
  </code></pre>
  
  <p>It is 19.000.000 bytes in size... around ~18.5 MB in Windows Explorer.</p>
  
  <p>I need to manipulate this file "in memory" and do Linq Queries on it with minimal memory footprint.
  This is one application I created for testing and after loading the ~18.5 MB file, it eats ~47MB of memory.
  Here is the code commented:</p>
  
  <pre><code>namespace ConsoleApplication1
  {
      public class FileClass
      {
          public string Field1 { get; set; }
          public string Field2 { get; set; }
          public string Field3 { get; set; }
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              //Current Memory Heap Size: ~91 KB
              List&lt;FileClass&gt; fileClass = new List&lt;FileClass&gt;(); 
  
              //Current Memory Heap Size: ~172 KB
              foreach (string line in File.ReadLines("c:\\somewhere\\My19000KBFile.txt"))
              {
                  string[] linepart = line.Split('\t');
                  fileClass.Add(new FileClass()
                  {
                      Field1 = linepart[0],
                      Field2 = linepart[1],
                      Field3 = linepart[2]
                  });
              }
  
              //After bringing file in memory
              //Current Memory Heap Size: ~47,000 KB
          }
      }
  }
  </code></pre>
  
  <p>Any idea on how can I bring such file in memory, parse it into a <code>List&lt;Class&gt;</code> without taking so big memory footprint?</p>