I have a Dictionary and a List of keys to remove from the dictionary. This is my implementation right now:
var keys = (from entry in etimes
where Convert.ToInt64(entry.Value) < Convert.ToInt64(stime)
select entry.Key).ToList();
foreach (var key in keys)
{
etimes.Remove(key);
count--;
}
Is there something I can do the eliminate the foreach loop?