<p>What is the best way to find something in a list?  I know LINQ has some nice tricks, but let's also get suggestions for C# 2.0.  Lets get the best refactorings for this common code pattern.</p>

<p>Currently I use code like this:</p>

<pre><code>// mObjList is a List&lt;MyObject&gt;
MyObject match = null;
foreach (MyObject mo in mObjList)
{
    if (Criteria(mo))
    {
        match = mo;
        break;
    }
}
</code></pre>

<p>or</p>

<pre><code>// mObjList is a List&lt;MyObject&gt;
bool foundIt = false;
foreach (MyObject mo in mObjList)
{
    if (Criteria(mo))
    {
        foundIt = true;
        break;
    }
}
</code></pre>

Put the code in a method and you save a temporary and a
```
break
```
(and you recycle code, as a bonus):
```
```
T Find<T>(IEnumerable<T> items, Predicate<T> p) {
    foreach (T item in items)
        if (p(item))
            return item;

    return null;
}
```
```
… but of course this method already exists anyway for Lists, even in .NET 2.0.