I am sure that my in my hashtable, there is no duplicated value and key. Here is my 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);
}
}
}
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??