Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: ConsoleColoredString ToConsoleColoredString(this object, ConsoleColor?, ConsoleColor?)

Declaration

public static ConsoleColoredString ToConsoleColoredString(
    this object obj,
    ConsoleColor? defaultForeground = null,
    ConsoleColor? defaultBackground = null
)

Summary

Returns the specified object as a colored string.

Parameters

this objectobj The object to convert.
ConsoleColor?defaultForeground The foreground color to color the string in if it is not already a ConsoleColoredString.
ConsoleColor?defaultBackground The background color to color the string in if it is not already a ConsoleColoredString.

Returns

A potentially colorful string.