Exemplo n.º 1
0
        public Canvas(char[][] symbols, ConsoleColor[][] colors)
        {
            this.Height = symbols.Length;
            this.Width = symbols[0].Length;
            this.Symbols = symbols;
            this.Colors = colors;

            if (colors.Length != this.Height ||
                symbols.Any(row => row.Length != this.Width) ||
                colors.Any(row => row.Length != this.Width))
            {
                throw new ArgumentOutOfRangeException("Input dimensions do not match.");
            }
        }