Console.Read() Method is used to read the next character from the standard input stream. This method basically blocks its return when the user types some input characters. As soon as the user press ENTER key it terminates.
Syntax: public static int Read ();
Return Value: It returns the next character from the input stream, or a negative one (-1) if there are currently no more characters to be read.
Exception: This method will give IOException if an I/O error occurred.
Below programs illustrate the use of above-discussed method:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.