title: How to copy a row of values from a 2D array into a 1D array?
body: <p>We have the following object</p>
  
  <pre><code>int [,] oGridCells;
  </code></pre>
  
  <p>which is only used with a fixed first index</p>
  
  <pre><code>int iIndex = 5;
  for (int iLoop = 0; iLoop &lt; iUpperBound; iLoop++)
  {
    //Get the value from the 2D array
    iValue = oGridCells[iIndex, iLoop];
  
    //Do something with iValue
  }
  </code></pre>
  
  <p>Is there a way in .NET to convert the values at a fixed first index into a single dimension array (other than by looping the values)?</p>
  
  <p>I doubt it would speed up the code (and it may well make it slower) if the array is only being looped once. But if the array was being heavily manipulated then a single dimension array would be more efficient than a multi dimension array.</p>
  
  <p>My main reason for asking the question is to see if it can be done and how, rather than using it for production code.</p>