Exemple #1
0
 public static void Print <T, K>(IGroupEnumerator <T, K> e)
 {
     while (e.MoveNextGroup())
     {
         Console.WriteLine(e.CurrentKey);
         Console.WriteLine("-----------");
         while (e.MoveNext())
         {
             Console.WriteLine("  " + e.Current);
         }
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            IGroupEnumerator <int, bool> myEnumerador = Grouper.GroupBy <int, bool>(new int[] { 2, 4, 5, 7, 9, 10, 14, 132 }, new ParitySelector());

            Print <int, bool>(myEnumerador);
        }