Why does my comparison always return false?
<p>I have bunch of usernames in this arraylist and I want to check whether username exists in the arraylist or not but the method always returns false.</p>

<pre><code>public bool check_username(ArrayList userList, string username)
{           
    for (int i = 0; i &lt; userList.Count; i++)
    {
        if (userList[i].ToString() == username)
        {
            return true;
        }
    }
    return false;
} 
</code></pre>
