Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: ConsoleColoredString Color(char, ConsoleColor?, ConsoleColor?)

Declaration

public ConsoleColoredString Color(
    char character,
    ConsoleColor? foreground,
    ConsoleColor? background
)

Summary

Changes the colors of every occurrence of character in the current string to the specified set of console colors.

Parameters

charcharacter The character whose color to replace.
ConsoleColor?foreground The foreground color to set the characters to, or null to use the console’s default foreground color.
ConsoleColor?background The background color to set the characters to, or null to use the console’s default background color.

Returns

A new string containing the modified colors.