How fast are Count and Capacity?
<p>I often write code like this:</p>

<pre><code>if ( list.Count &gt; 0 ) { }
</code></pre>

<p>Is this efficient? Does this operation look like:</p>

<ul>
<li>Iterate through the list and count its elements</li>
<li>Result: 986,000 elements</li>
<li>Is 986,000 greater than 0?</li>
<li>return true</li>
</ul>

<p>Or like this:</p>

<ul>
<li>Retrieve the stored number of elements in the list (986,000)</li>
<li>Is 986,000 greater than 0?</li>
<li>return true</li>
</ul>

<p>That is, to get the number of elements in the list, do you have to count all the way through the list, or is the number of elements recorded somewhere? And is this the case for all <code>ICollection</code> classes?</p>

<p>What about the <code>Capacity</code> of the list?</p>
