title: How to convert Fortran subarray syntax like X(:,J) to VB.NET and C#
body: <p>I have come across some Fortran I am converting, like the following</p>
  <pre><code>DO J = 1 , N
     C(:,J) = C(:,J) * X(J)
  ENDDO
  </code></pre>
  <p>and believe I need to explicitly write code to loop through the first dimension as well.  In VB.Net
  this would be:</p>
  <pre class="lang-vb prettyprint-override"><code>For j = 1 to N
     For i = 1 to C.GetLength(0)-1
        C(i,j) = C(i,j) * X(j)
     Next k
  Next j
  </code></pre>
  <p>and in C#, this would be</p>
  <pre class="lang-cs prettyprint-override"><code>for (int j = 1; j &lt;= N; j++)
  {
     for (int i = 1; i &lt; C.GetLength(0); i++)
     {
        C(i,j) = C(i,j) * X(j);
     }
  }
  </code></pre>
  <p>Is this correct?  I do need only to pull the first dimension off of the C matrix.</p>