CSharp examples for System.Collections.Generic:IDictionary
Merge two IDictionary
using System.Collections.Generic; public class Main{ public static void Merge<TKey, TValue>(this IDictionary<TKey, TValue> target, IDictionary<TKey, TValue> source) {/* ww w .j a v a 2 s .c o m*/ if (source == null) return; foreach (var kvp in source) { target.Add(kvp.Key, kvp.Value); } } }