using System;
public class Program
{
public static void Main()
try
//Put suspected code here. When an exception occurs, the control will move to the catch block
Console.WriteLine("--try");
throw new Exception();
}
catch
//Catch the exception
Console.WriteLine("--catch");
throw;
finally
// Will always get executed whether an exception occurs or not as long as there
// are no exceptions within this block itself or operating system interuptions (unplug).
// If an Exception is thrown here some outer try block should handle it
// Any Clean up code goes here. Especially to release anysystem resources
// such as file handles and network connections
Console.WriteLine("--finally");
// note: the following statements are not allowed inside a finally block:
// return, goto, break and continue