CSharp examples for System.Collections:IDictionary
Copies all the elements of IDictionary to target IDictionary.
using System.IO;/*from w w w . ja va 2 s . c o m*/ using System; public class Main{ /// <summary> /// Copies all the elements of d to target. /// </summary> /// <param name="target">Collection where d elements will be copied.</param> /// <param name="d">Elements to copy to the target collection.</param> public static void PutAll(System.Collections.IDictionary target, System.Collections.IDictionary d) { if (d != null) { System.Collections.ArrayList keys = new System.Collections.ArrayList(d.Keys); System.Collections.ArrayList values = new System.Collections.ArrayList(d.Values); for (int i = 0; i < keys.Count; i++) target[keys[i]] = values[i]; } } }