title: Struct store large chunk of data
body: <p>I have a data file with millions of rows and I wanted to read that and store in a struct.</p>
  
  <pre><code>public struct Sample
  {
      public int A;
      public DateTime B;
  }
  
  Sample[] sample = new Sample[];
  </code></pre>
  
  <p>This definition gives me this error "<strong>Wrong number of indicies inside[]; expected 1</strong>"</p>
  
  <p>How do I store data in struct (<strong>with less memory usage</strong>)? Array is that best of something else?</p>
  
  <pre><code>var reader = new StreamReader(File.OpenRead(@"C:\test.csv"));
  while (!reader.EndOfStream)
  {
      var line = reader.ReadLine();
      var values = line.Split(';');
  }
  </code></pre>