public void ForEach(ForEachDictionaryDelegate <TKey, TValue> action) { if (action == null) { throw new ArgumentNullException("action"); } foreach (var pair in this) { action(pair.Key, pair.Value); } }
/// <summary> /// Executes the same action for all the pairs in this dictionary. This /// is usually faster than iterating the dictionary. /// </summary> public void ForEach(ForEachDictionaryDelegate <TKey, TValue> action) { var owner = _GetOwner(); owner.ForEach(action); }