public override IEnumerator <KeyValuePair <string, object> > GetEnumerator() { for (Node temp = head; temp != null; temp = temp.getNext()) { yield return(new KeyValuePair <string, object>(temp.getKey(), temp.getValue())); } }
public override object Lookup(string key) { Node temp = head; while (temp != null) { if (temp.getKey() == key) { return(temp.getValue()); } temp = temp.getNext(); } throw new DictionaryKeyNotFoundException(key); }
public override object Lookup(string name) { int num = hash(name); Node temp = vals[num]; while (temp != null) { if (temp.getKey() == name) { return(temp.getValue()); } temp = temp.getNext(); } throw new DictionaryKeyNotFoundException(name); }