Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Constructor: ConsoleColoredString(string, ConsoleColor?[], ConsoleColor?[])

Declaration

public ConsoleColoredString(
    string input,
    ConsoleColor?[] foregroundColors,
    ConsoleColor?[] backgroundColors = null
)

Summary

Constructs a ConsoleColoredString with the specified text and the specified colors for each character.

Parameters

stringinput The string containing the text to initialize this ConsoleColoredString to. The length of this string must match the number of elements in foregroundColors.
ConsoleColor?[]foregroundColors The foreground colors to assign to each character in the string. The length of this array must match the number of characters in input.
ConsoleColor?[]backgroundColors The background colors to assign to each character in the string. The length of this array must match the number of characters in input. If null, the default color is used.