public static void setConfig(System.Collections.Hashtable foo) { lock(config) { System.Collections.IEnumerator e=foo.Keys.GetEnumerator(); while(e.MoveNext()) { String key=(String)(e.Current); config.Add(key, (String)(foo[key])); } } } }