Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="that"></param>
 public Array2D(Array2D <T> that)
     : this(that.Length0, that.Length1)
 {
     SetTo(that);
 }