Reads a line of the text file or input stream into memory, from the start of the current line up to the character immediately preceding the next end-of-line marker.
Files opened for writing or appending can’t be read; you
must first close the file and reopen it using the
The ReadLine method causes the file pointer to advance to the beginning of the next line, if there is one.
When used to retrieve standard input from the keyboard, the ReadLine method pauses program execution and waits until the end-of-line character (i.e., the Enter key) has been pressed. Unless your script expects to retrieve just one line of input, it’s best to call the ReadLine method repeatedly in a loop.