Does checking against null for 'success' count as "Double use of variables"?
<p>I have read that a variable should never do more than one thing.  Overloading a variable to do more than one thing is bad.  </p>

<p>Because of that I end up writing code like this:  (With the <code>customerFound</code> variable)</p>

<pre><code>bool customerFound = false;
Customer foundCustomer = null;
if (currentCustomer.IsLoaded)
{
    if (customerIDToFind = currentCustomer.ID)
    {
        foundCustomer = currentCustomer;
        customerFound = true;
    }
}
else
{
    foreach (Customer customer in allCustomers)
    {
        if (customerIDToFind = customer.ID)
        {
            foundCustomer = customer;
            customerFound = true;
        }
    }
}
if (customerFound)
{
    // Do something
}     
</code></pre>

<p>But deep down inside, I sometimes want to write my code like this: (Without the <code>customerFound</code> variable)</p>

<pre><code>Customer foundCustomer = null;
if (currentCustomer.IsLoaded)
{
    if (customerIDToFind = currentCustomer.ID)
    {
        foundCustomer = currentCustomer;
    }
}
else
{
    foreach (Customer customer in allCustomers)
    {
        if (customerIDToFind = customer.ID)
        {
            foundCustomer = customer;
        }
    }
}
if (foundCustomer != null)
{
    // Do something
}
</code></pre>

<p>Does this secret desires make me an evil programmer?</p>

<p>(i.e. is the second case really bad coding practice?)</p>
