title: Streamreader to 2d array
body: <p>How do I  take the contents of a file using a Streamreader and place it in a 2d array.
  The file is as follows: </p>
  
  <pre><code>    type1,apple,olive,pear
      type2,orange,nuts,melon
      type3,honey,grapes,coconut
  </code></pre>
  
  <p>So far my code is as follows:</p>
  
  <pre><code>     public static void invent()
      {
          StreamReader reader2 = new StreamReader("food.txt");
          while (reader2.EndOfStream == false)
          {
              string[,] line = new string[1000, 1000];
  
               line = reader2.ReadLine();
          }
  
  
      }
  </code></pre>