Hashtable clone(Hashtable hash) { if (hash == null) return null; Hashtable new_hash = new Hashtable (); foreach (string key in hash.Keys) new_hash.Add (key, hash [key]); return new_hash; }