Ejemplo n.º 1
0
        public void DisplayText()
        {
            // Writes out on the console the text with the correct ForegroundColor and BackgroundColor associated with Back/ Fore color
            // property of the instance. There should be padding before / after the Text property based on the int value associated with padding
            Console.BackgroundColor = BackColor;
            Console.ForegroundColor = ForeColor;
            string BackgroundColor;
            string ForegroundColor;

            Console.WriteLine(BackgroundColor.PadLeft(10, '-'));
            Console.WriteLine(BackgroundColor.PadRight(10, '-'));
            Console.WriteLine(ForegroundColor.PadRight(10, '-'));
            Console.WriteLine(ForegroundColor.PadLeft(10, '-'));
            // used pad method from referencing
            // https://docs.microsoft.com/en-us/dotnet/standard/base-types/padding
        }