Пример #1
0
 //copies the items in the dictionary into the array
 public void CopyTo(KeyValuePair <TKey, HashSet <TValue> >[] array, int arrayIndex)
 {
     if (array == null)
     {
         throw new ArgumentNullException();
     }
     if (arrayIndex < 0 || arrayIndex > array.Count())
     {
         throw new ArgumentOutOfRangeException();
     }
     if ((array.Count() - arrayIndex) < MultiDictionary.Count())
     {
         throw new ArgumentException();
     }
     foreach (var pair in MultiDictionary)
     {
         array[arrayIndex] = pair;
         ++arrayIndex;
     }
 }