Console.ReadLine
Console.ReadLine reads a line of input and returns it as a string.
Console.Write("Enter text: ");string input = Console.ReadLine();Console.WriteLine($"You entered: {input}");Run the Application
Section titled “Run the Application”dotnet runResult (example input “test”)
Section titled “Result (example input “test”)”Enter text: testYou entered: test