private static void SwapGenericCollection(GenericCollection <int> genericCollection) { int[] indexes = Console.ReadLine() .Split(' ') .Select(int.Parse) .ToArray(); genericCollection.GenericSwap(indexes[0], indexes[1]); }