 int ch;
while ((ch = Console.Read()) != -1)



The loop in the code above reads characters by calling , skipping the statements in the body of the loop if the characters are spaces.Runtime exception handling method in C# is inherited from Java and C++.The base class library has a class called from which all other exception classes are derived.