public static TOutput[,] ToArray <TOutput>(Converter <T, TOutput> itemConverter, Array2D <T> array) { TOutput[,] result = new TOutput[array.Length0, array.Length1]; for (int i = 0; i < array.Length0; i++) { for (int j = 0; j < array.Length1; j++) { result[i, j] = itemConverter(array[i, j]); } } return(result); }
/// <summary> /// Copy constructor. /// </summary> /// <param name="that"></param> public Array2D(Array2D <T> that) : this(that.Length0, that.Length1) { SetTo(that); }