コード例 #1
0
 private static void _addFunctionMethod<T>(UniqueCollection<T> uniqueCollection, Collection<T> toAdd)
 {
     foreach (T item in toAdd)
     {
         uniqueCollection.Add(item);
     }
 }
コード例 #2
0
 private static void _test<T>(AddFunction<T> addFunction, Collection<T> toAdd)
 {
     UniqueCollection<T> uniqueCollection = new UniqueCollection<T>();
     try
     {
         addFunction(uniqueCollection, toAdd);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     finally
     {
         uniqueCollection.Print();
     }
 }