Performance question about enumerating empty lists
<p>which is better, performance-wise, when you potentially have an empty list?</p>

<pre><code>if (_myList != null &amp;&amp; _myList.Count &gt; 0)
{
  foreach (thing t in _myList )
  {
    ...
</code></pre>

<p>or without checking if _myList count contains anything:</p>

<pre><code>if (_myList != null)
{
  foreach (thing t in _myList )
  {
   ...
</code></pre>

<p>I'm guessing there's probably not much in it, but that the first one is <em>slightly</em> quicker (?)</p>

<p>Thanks</p>

<hr>

<p>edit:</p>

<p>To clarify, I mean a list like this: <code>List&lt;Thing&gt;</code></p>
