Array.Convertall
//Double each value in an array using Array.ConvertAll();
using System;
public class Kata
{
public static int[] DoubleTheArrayElements(int[] arr)
{
return Array.ConvertAll(arr, element => element * 2);
}
}
// could also just be done with LINQ like this:
return arr.Select(x => x * 2);
Albert Rovsing