Class ConsoleFormatting
Text formatting tools for the console
Inheritance
object
ConsoleFormatting
Namespace
Syntax
public static class ConsoleFormatting
Properties
CurrentFormatting
Current text formatting
Property Value
Declaration
public static ConsoleFormattingType CurrentFormatting { get; }
TextFormatted
Has the text been formatted?
Property Value
bool
Declaration
public static bool TextFormatted { get; }
Methods
GetFormattingSequences(ConsoleFormattingType)
Gets the formatting sequences for the selected formatting types
Returns
string
A string containing necessary VT sequences for all selected text formatting
Declaration
public static string GetFormattingSequences(ConsoleFormattingType types)
Parameters
| Name | Type | Description |
|---|---|---|
| types | ConsoleFormattingType | Selected formatting types |
ResetFormatting()
Resets console text formatting
Declaration
public static void ResetFormatting()
SetFormatting(ConsoleFormattingType)
Sets text formatting for future plain writes
Declaration
public static void SetFormatting(ConsoleFormattingType formattings)
Parameters
| Name | Type | Description |
|---|---|---|
| formattings | ConsoleFormattingType | All text formatting to use |