There is a function, which can read a single line from the console input (Console.ReadLine()), but I wish to read or some arbitrary number of lines, which is unknown at compile time.
There is a function, which can read a single line from the console input
Share
Of course it is. Just use just read a single line (using
ReadLine()or whatever else you please) at a time within either a for loop (if you know at the beginning of reading how many lines you need) or within a while loop (if you want to stop reading when you reachEOFor a certain input).EDIT:
Sure: