private static int[] ToIndices(Object[] arguments){ int n = arguments.Length; int[] result = new int[n]; for (int i = 0; i < n; i++) result[i] = Convert.ToInt32(arguments[i]); return result; } }