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:
- Difference between Method Overriding and Method Hiding in C#
- C# | Uri.MakeRelativeUri(Uri) Method
- Array.GetValue() Method in C# with Examples | Set - 1
- C# | CharEnumerator.MoveNext() Method
- C# | Math.IEEERemainder() Method
- C# | Substring() Method
- C# | IndexOfAny() Method
- C# | CharEnumerator.GetType() Method
- HTML | DOM isEqualNode() Method
- File.GetLastWriteTimeUtc() Method in C# with Examples
- MathF.Sin() Method in C# with Examples
- ArrayList toArray() method in Java with Examples
- Double.CompareTo Method in C# with Examples
- TreeSet pollFirst() method in Java
- C# | Graphics.DrawLine() Method | Set - 1
- UInt16.GetHashCode Method in C# with Examples
- Stack.Peek Method in C#
- C# | IsNullOrEmpty() Method
- C# | Math.Sign() Method
- Int64.CompareTo Method in C# with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.