In a simple console app that requests the users input, I'm asking for a user input. That input is then saved into a variable for later use.
How can I display the input while it's being typed into the console, but hide it after its been submitted?
For example:
class Program
{
static void Main()
{
string input = null;
Console.WriteLine("Type Something: ");
input = Console.ReadLine();
Console.WriteLine("You Typed" + input);
}
}
After running the above code, the output below is printed to the console is:
Type Something:
abc 123
You Typedabc 123
How can I adapt this code so as, after the user has typed and submitted the input, it does not appear in the output?