Show / Hide Table of Contents

Class ConsoleSymbols

Provides standardized symbols for console output, with automatic fallback to ASCII if Unicode is unsupported.

Inheritance
System.Object
ConsoleSymbols
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: WizardWrx
Assembly: WizardWrx.Common.dll
Syntax
public static class ConsoleSymbols
Remarks

In character-mode (console) applications that use them, the Unicode glyphs, BULLET, CHECK_MARK, CROSS_MARK, and RIGHT_ARROW, require a console that supports UTF-8. Use Initialize() to coerce the console to use a UTF-8 code page that supports them. Additionally, to properly display these glyphs, your console must render in a font face that supports these Unicode glyphs. Examples are Consolas, Cascadia Code, and Segoe UI Emoji.

For ease of access, I promoted the classes that expose only constants to the root of the WizardWrx namespace.

Fields

| Improve this Doc View Source

Check

Unicode check mark (✔) or ASCII fallback ("[OK]").

Declaration
public static readonly string Check
Field Value
Type Description
System.String
| Improve this Doc View Source

Cross

Unicode cross mark (✘) or ASCII fallback ("[X]").

Declaration
public static readonly string Cross
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

IsInitialized

The static constructor sets this method to True.

Declaration
public static bool IsInitialized { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Initialize()

Forces static constructor execution early, ensuring encoding is set before first output.

Declaration
public static void Initialize()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX