I need when the user type help to print a help text, but this needs to work on any part of the code and not on some parts. Same as CMD, when someone types help, all available commands appear.
I need when the user type help to print a help text, but this needs to work on any part of the code and not on some parts. Same as CMD, when someone types help, all available commands appear.
One option may be to define a method eg
public string LerEntradaConsole()
{
string texto = Console.ReadLine();
if (!texto.Contains("help"))
return texto;
else
{
ExibirTextoAjuda(texto);
return LerEntradaConsole();
}
}
And always use this method instead of Console.ReadLine (). In the ViewTextHelp method you will have to extract what the user typed and print the on-screen help.