title: Iterating through a 2D array with foreach
body: <p>I was trying to iterate through an array with this statement: foreach(int[] arr in arr2D). It works similarly in Java. Why does it not work in C#? Thanks!</p>
  
  <pre><code>public static int[] RowSums(int[,] arr2D)
  {
    int[] sums = new int[arr2D.Length];
    int rowCount = 0;
  
    foreach (int[] arr in arr2D)
    {
      sums[rowSums] = ArraySum(arr);
      rowSums++;
    } 
  
    return sums;
  } 
  </code></pre>