Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: ConsoleColoredString ColorWhereNull(ConsoleColor, ConsoleColor?)

Declaration

public ConsoleColoredString ColorWhereNull(
    ConsoleColor foreground,
    ConsoleColor? background = null
)

Summary

Changes the colors of every character in the current string to the specified console color only where there isn’t already a color defined.

Parameters

ConsoleColorforeground The foreground color to set the uncolored characters to, or null to use the console’s default foreground color.
ConsoleColor?background The background color to set the uncolored characters to, or null to use the console’s default background color.

Returns

The current string but with the colors changed.