How to remove a pair in hashtable knowing the hash.value
<p>I am sure that my in my hashtable, there is no duplicated value and key.
Here is my code:</p>

<pre><code>     private void checkclientleave(string content)
    {
        if (content == "I am leaving the room")
        {
            foreach (DictionaryEntry dict in clientsInroom)
            {
                 if (dict.Value == clientSocket)
                    clientsList.Remove(dict.Key);
            }
   }
   }
</code></pre>

<p>The value of my hashtable is the socket for each client.
The key of my hashtable is the name of each client.
I got some unknown error: collection was modified enumeration operation may not execute
Anyone has any idea??</p>
