8

I was wondering if anyone knew of a library for .net console apps that handled all the menuing functionality. I know its not that complex and I can just use Console.WriteLine("..."); to write text then do Console.ReadLine();, but am just curious if anyone knows of something existing that would handle the menuing. I'm likely to need submenus which would make the code complex.

(Don't ask why I have to do this...)

Tim Coker
  • 6,484
  • 2
  • 31
  • 62

4 Answers4

7

You could also use Terminal.Gui for a console driven GUI.

I added this for reference purposes only, while searching for "Terminal.Gui" I stumbled upon this question.

Demo

Steffen
  • 91
  • 2
  • 3
5

There is a C# binding to the nCurses library, found here. It is an API that helps with writing text based interfaces.

If you are simply looking for command line parameter parsing - commandline is a good library for that.

LuftWaffle
  • 187
  • 1
  • 3
  • 19
Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • @Tim Coker - I hope I understood your question correctly... I assumed that when you say `menu` in a console app, you need a whole text based interface :) – Oded Jul 26 '10 at 19:08
  • Yup. Probably overkill for what I'm actually doing, but it'll work. I saw a few curses implementations for windows, but didn't find one with good c# integration. – Tim Coker Jul 26 '10 at 19:16
5

You could use the NuGet library called Spectre.Console.

enter image description here

Lernkurve
  • 20,203
  • 28
  • 86
  • 118
2

I recommend checking out EasyConsole.

Has a Nuget package and supports complex menu nesting.

ElliotSchmelliot
  • 7,322
  • 4
  • 41
  • 64