title: storing the content of a 2 dimension c# array into a csv file
body: <p>I have a a C# array from which I would like to get each element and store it in each csv cell.I have written the following:</p>
  
  <pre><code>StreamWriter file = new StreamWriter("C:/mylocation/data.csv");
  //my2darray  is my 2d array created.
  for (int i = 0; i &lt; my2darray.GetLength(1); i++)
     {
              for (int j=0; j&lt;my2darray.GetLength(0);j++)
              {
                  file.Write(my2darray[i][j]);
                  file.Write("\t");
              }
              file.Write("\n"); // go to next line
       }
  </code></pre>
  
  <p>The problem is that each csv cell contains more than one array element. How can it be fixed?</p>