Skip to content

TizzyT566/WriteLineC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WriteLineC

A little helper to make writing text with color easier.

Usage

Methods

/// <summary>
/// Synonymous to System.Console.WriteLine() with ability to include ConsoleColor information.
/// </summary>
/// <param name="textColorInfo">Text and their color information.</param>
public static void WriteLine(params ConsoleTextColorInfo[] textColorInfo)
/// <summary>
/// Synonymous to System.Console.Write() with ability to include ConsoleColor information.
/// </summary>
/// <param name="textColorInfo">Text and their color information.</param>        
public static void Write(params ConsoleTextColorInfo[] textColorInfo)
/// <summary>
/// Prompts the user for input after a message.
/// </summary>
/// <param name="textColorInfo">Text and their color information.</param>
/// <returns>The users input.</returns>
public static string PromptLine(params ConsoleTextColorInfo[] textColorInfo)
/// <summary>
/// Prompts the user for input with a message.
/// </summary>
/// <param name="textColorInfo">Text and their color information.</param>
/// <returns>The users input.</returns>
public static string Prompt(params ConsoleTextColorInfo[] textColorInfo)

Example

using static WriteLineC.Console;

// Write normally
WriteLine("Hello world");

// Write text in red
WriteLine(("Hello World", Red));

// Write Hello in red and world in blue with green background
WriteLine(("Hello", Red), " ", ("world", Blue, Green));

Output

About

A little helper to make writing text with color easier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages