If you try to modify a collection while enumarte over it you will get an Exception : "Collection was modified; enumeration operation may not execute."
Personally, I simply copy the keys:
Hashtable t = new Hashtable();
t.Add(1, 1);
t.Add(2, 2);
ArrayList a = new ArrayList(t.Keys);
foreach (int i in a)
{
t.Remove(i);
}
Eric Gunnerson has another aproach. You can read it here.