Console.ReadLine
Skip to content
mnscript
string Console.ReadLine() 

Description ​

Waits for console input and returns it once received

Returns ​

string - The text entered in the console

Example ​

msc
using Console;
                
// Console.ReadLine pauses the program until a command is typed.
// When something is typed in console, it will be assigned to the variable.
// This will also prevent the input from being processed as a command on the terminal.

string text = Console.ReadLine();