C# – Introduction to Exceptions
Introduction: While compiling and executing the code, chance of getting different types of errors. Logical Errors: If we get the output of code instead of Expected contains Logical error. FormatException: It occurs if user enter invalid input while reading through ReadLine(). Output: