Do you know that? 90% of Elance-oDesk clients feel that hiring online will soon become a common practice next

How Do Exceptions Work?

If during the normal program execution one of the methods throws an exception, the normal flow of the program is interrupted. In the example above this happens when the StreamReader is initialized. Let’s take a look on the following line:
TextReader reader = new StreamReader("WrongTextFile.txt");
If this line triggers an error, the reader local variable will not be initialized and it will have its default value of null. None of the lines that follow in the method will be executed. The program will be interrupted until the CLR finds a handler that can process the exception.