Exemplo n.º 1
0
 private static void ResizeTariffArray(ref Tariff[,] array, int rows, int cols)
 {
     Tariff[,] newArray = new Tariff[rows, cols];
     for (int i = 0; i < newArray.GetLength(0); i++)
     {
         for (int j = 0; j < newArray.GetLength(1); j++)
         {
             if (i >= array.GetLength(0) || j >= array.GetLength(1))
             {
                 newArray[i, j] = null;
             }
             else
             {
                 newArray[i, j] = array[i, j];
             }
         }
     }
     array = newArray;
 }