ExtendedConsole 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ExtendedConsole --version 1.0.0
NuGet\Install-Package ExtendedConsole -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExtendedConsole" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExtendedConsole --version 1.0.0
#r "nuget: ExtendedConsole, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ExtendedConsole as a Cake Addin
#addin nuget:?package=ExtendedConsole&version=1.0.0

// Install ExtendedConsole as a Cake Tool
#tool nuget:?package=ExtendedConsole&version=1.0.0

The ExtendedConsole project was created after writing many .Net console applications, and finding myself spending way too much time and effort on doing what should be, in my humble opinion, simple and trivial tasks.

Things like highlighting parts of the output text, validating and parsing user inputs, and creating simple menus - all of these tasks seems to have been, for the lack of a better term, neglected when it comes to console applications.
The ExtendedConsole project is here to provide easy-to-use solutions to these tasks.

This project is completely open source and free to use, under the MIT licence. It's source code is available on GitHub, and it's fully documented.

ExtendedConsole provides the following features:

Markup support:
ExtendedConsole provides a super simple, xml based markup support for writing text to the Console.
No more breaking up your strings to multiple Console.Write commands just to color parts of your text - With ExtendedConsole it's as easy as

exConsole.Write("<c b='darkRed' f='white'>White text on a dark red background</c>");

Menus:
ExtendedConsole provides methods to generate console menus.
Creating a menu with ExtendedConsole is as simple as this:

var selected = exConsole.Menu(
	"What to do next?",
	true,
	("Quit", null),
	("Go here", GoHere),
	("Pause", () => exConsole.Pause()),
	("Do that", DoThat)
);

User inputs:
ExtendedConsole provides methods to help you read and parse user input.
It supports int, boolean, DateTime, and custom classes and structs.
For instance, to get a number between 0 and 5 from your users, use this:

var result = exConsole.ReadInt(
	"Please enter an int between 0 and 5, inclusive.", 
	i => i >= 0 && i <= 5
);

Clear lines:
ExtendedConsole provides methods to clear a specific line or lines.
For instance, to clear the last three lines of the console, use this:

exConsole.ClearLastLines(3);

Easily extensible
ExtendedConsole is designed to be as easy to extend as possible.
All you have to do is add whatever extension methods you need.
This is one of the main reasons it's built as a single main class, and most of it's features are in extension methods - it provides two clear benefits:
It can be used as a guideline to users on how to add features.
It makes it easier to maintain, as the classes are relatively small and focused.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 160 12/27/2023
2.0.0 370 10/12/2021
1.1.1 330 5/17/2021
1.1.0 295 5/17/2021
1.0.5 474 12/7/2019
1.0.4 480 12/5/2019
1.0.3 483 11/25/2019
1.0.2 464 11/21/2019
1.0.1 467 11/11/2019
1.0.0 474 11/5/2019