0
How to print multiple Output using ReadLine() in C#
I am definitely a beginner can someone help me thanks
6 Answers
0
Console.ReadLine (); reads until the end of the line. If you want to take multiple lines of text call Console.ReadLine () for every line that you want to store. btw Console.ReadLine () returns the string that the user inputted after they hit enter.
0
How about integers ? i want to input integers . Btw i am using Android phone only
0
Thank you
0
no problem, if you can could you mark my answer as the answer.
0
I am a beginner and o want to pursue IT in college for now im busy in self study
- 1
You can convert the output of console.readline to in integer.
int number = int.parse(Console.ReadLine());
If you are to give that a non numerical value like a word: hello, for example that would throw an exception.
For that you can try int.TryParse(string, out int number);