public Container(SeparateChainingHashTable <TKey, TValue> separateChainingHashTable) { foreach (Collection <HashNode <TKey, TValue> > row in separateChainingHashTable.hashTable) { foreach (HashNode <TKey, TValue> element in row) { dictionary[element.Key] = element.Value; } } }
public Set(SeparateChainingHashTable <object, TValue> separateChainingHashTable) { foreach (Collection <HashNode <object, TValue> > row in separateChainingHashTable.hashTable) { foreach (HashNode <object, TValue> element in row) { set.Add(element.Value); } } }