Inputty simplifies the process of getting input from the console. Tested on Windows and Ubuntu.
$ dotnet add package InputtyInputty is a simple library that helps simplify the process of getting input from the console. Inputty allows you to define the prompt, specify allowable values, and specify boundary conditions.
First things first - do you need help or have feedback? File an issue here or start a discussion!
using GetSomeInput;
string answer1 = Inputty.GetString("What's your name?", null, false);
// question, default answer, allow null
int answer2 = Inputty.GetInteger("What's your age?", 42, true, true);
// question, default answer, positive only, allow zero
Yep, it's that simple.
Inputty supports a decent range of return types:
StringList<String>IntBooleanDecimalDoubleDictionaryNameValueCollectionDateTimeDateTime?Guid