Forum Discussion

PaulinusWong's avatar
PaulinusWong
Copper Contributor
Dec 01, 2024

Enhancing Console.ReadLine to Accept a Message Parameter

n Python, the input function allows you to display a message and wait for user input in a single line of code. However, in C#, achieving the same functionality requires two lines: one for Console.WriteLine to display the message and another for Console.ReadLine to capture the input. Is it possible to have a ReadLine function in C# that takes a message as a parameter and waits for user input?

No RepliesBe the first to reply

Resources