foreach(BruteforceEntry be in Entries.Values)
{
if (be.AddedTimeRemove <= now)
Entries.Remove(be.IPAddress);
else if (be.Unbantime <= now && be.Unbantime.Day == DateTime.Now.Day)
Entries.Remove(be.IPAddress);
}
An exception was thrown: Collection was modified; enumeration operation may not execute. For some reason, it is not anymore.
EDIT: I know you cannot remove something, while iterating through it this way, my question is hhow do I solve it?