ConsoleMenuSelection 1.0.4

dotnet add package ConsoleMenuSelection --version 1.0.4
                    
NuGet\Install-Package ConsoleMenuSelection -Version 1.0.4
                    
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="ConsoleMenuSelection" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ConsoleMenuSelection" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="ConsoleMenuSelection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ConsoleMenuSelection --version 1.0.4
                    
#r "nuget: ConsoleMenuSelection, 1.0.4"
                    
#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.
#:package ConsoleMenuSelection@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ConsoleMenuSelection&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=ConsoleMenuSelection&version=1.0.4
                    
Install as a Cake Tool

General information

  • This is a small project which I made to save time in school since this is something I use quite often. I am not planning on doing regular updates or additions, this was just a small project out of lazyness to not rewrite the same code over and over in different projects.

1 Selection Menu

1.1 Using the Console Selection Menu

  • The Selection Menu can be initiated the follow way:
User selectedUser = new SelectionMenu<User>(users, u => u.Name).Show()
string selected = new SelectionMenu<string>(listOfStrings, s => s).Show()

1.2 Navigating the Console Selection Menu

  • The selection menu can be navigated using the following keys:
    • Arrow Up
    • Arrow Down
    • W
    • S
    • Enter: Select the current item

2 Checkbox Selection

2.1 Using the CheckboxSelection:

  • With the Checkbox selection, multiple items can be selected and will be returned as List<T>
  • The Initiation follows the same rules as the Selection Menu
List<User> userSelections = new CheckboxSelection<User>(users, u => u.Name).Show()
List<string> selectedStrings = new CheckboxSelection<string>(listOfStrings, s => s).Show()

2.2 Navigating the Checkbox Selection:

  • The Checkbox selection can be navigated using the following keys:
    • Arrow Up
    • Arrow Down
    • W
    • S
    • Spacebar: to select/unselect the current item
    • Enter: Returns all selected items

3 Options

  • With Version 1.0.4 there are more styling options for the selection menu's. These options can be implemented with SelectionOptions where the styling can be applied using the Enum's provided from ESelectionStyles
  • The SelectionMenu and CheckboxSelection constructors are overloaded and can be initiated in 2 different ways:

3.1 Option 1:

// SelectionMenu
User selectedUser = new SelectionMenu<User>(users, u => u.Name).Show()
string selected = new SelectionMenu<string>(listOfStrings, s => s).Show()

// CheckboxSelection
List<User> userSelections = new CheckboxSelection<User>(users, u => u.Name).Show() 
List<string> selectedStrings = new CheckboxSelection<string>(listOfStrings, s => s).Show()

3.2 Option 2:

var userOptions = new SelectionOptions<User>()
{
    Items = users,
    DisplaySelector = a => a.Name,
    Style = ESelectionStyles.Default
};

var stringOptions = new SelectionOptions<string>()
{
    Items = options,
    Style = ESelectionStyles.Default,
};

// SelectionMenu
User selectedUser = new SelectionMenu<User>(userOptions).Show()
string selected = new SelectionMenu<string>(stringOptions).Show()

// CheckboxSelection
List<User> userSelections = new CheckboxSelection<User>(userOptions).Show() 
List<string> selectedStrings = new CheckboxSelection<string>(stringOptions).Show()
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.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
1.0.4 98 5/17/2026
1.0.3 128 2/9/2026
1.0.2 200 10/27/2025
1.0.1 184 10/19/2025
1.0.0 186 10/19/2025