Find amount of rows in a data table without looping C#
<p>I currently have a piece of code that works fine, listed below:</p>

<pre><code> foreach (DataRow dr in dt.Rows)
            {
                if ((int)dr["StatusId"] == 1)
                {
                  count += 1;

                }

            }
</code></pre>

<p>I then create an array using count as the length of my new array and cycle back through an identical loop to populate the array. Is there a way that I can do something to get the amount of of rows in the data table without creating the original loop so I can clean up my code some?</p>