06.HighQualityMethodsHomework/RefactorCSharpPart2Exam/11. CSharp-Part-2-Exam/CSharp-Part-2-Exam/LoverOf2/LoverOf2.cs
/// <summary>
/// Fills a 2-dimensional array of BigIntegers with powers of 2
/// following a predefined pattern
/// </summary>
/// <param name="matrix">2-dimensional array of BigIntegers to fill</param>
Fills a 2-dimensional array of BigIntegers with powers of 2
following a predefined pattern
Fills a 2 - dimensional array of BigIntegers with powers of 2 following a predefined pattern
private static void FillMatrix(BigInteger[,] matrix)
        {
            for (int row = 0; row < matrix.GetLength(0); row++)
            {
                for (int col = 0; col < matrix.GetLength(1); col++)
                {
                    matrix[matrix.GetLength(0) - 1 - row, col] = Power(2, row + col);
                }
            }
        }
private static void FillMatrix ( BigInteger [ , ] matrix ) { for ( int row = 0 ; row < matrix . GetLength ( 0 ) ; row ++ ) { for ( int col = 0 ; col < matrix . GetLength ( 1 ) ; col ++ ) { matrix [ matrix . GetLength ( 0 ) - 1 - row , col ] = Power ( 2 , row + col ) ; } } }
Fills a 2-dimensional array of BigIntegers with powers of 2
following a predefined pattern
Fills a 2 - dimensional array of BigIntegers with powers of 2 following a predefined pattern
matrix
BigInteger[,]
2-dimensional array of BigIntegers to fill
2 - dimensional array of BigIntegers to fill