Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: ConsoleColoredString Color(this string, ConsoleColor?, ConsoleColor?)

Declaration

public static ConsoleColoredString Color(
    this string str,
    ConsoleColor? foreground,
    ConsoleColor? background = null
)

Summary

Colors the specified string in the specified console color.

Parameters

this stringstr The string to color.
ConsoleColor?foreground The foreground color to color the string in.
ConsoleColor?background The background color to color the string in.

Returns

A potentially colorful string.