![]() Get an array with the values of ConsoleColor enumeration members.ĬonsoleColor colors = (ConsoleColor) ConsoleColor.GetValues(typeof(ConsoleColor)) ![]() ![]() (If the foreground color is the same as the background color, the text isn't visible.) Finally, it calls the ResetColor method to restore the original console colors. It then changes the foreground color to each color in the ConsoleColor enumeration except to the color that matches the current background, and it changes the background color to each color in the ConsoleColor enumeration except to the color that matches the current foreground. The following example saves the values of the ConsoleColor enumeration to an array and stores the current values of the BackgroundColor and ForegroundColor properties to variables. ![]() The color dark magenta (dark purplish-red). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |