using System;
public class Program
{
public static void Main()
Console.WriteLine("The result of Divide(0,0) : {0}", Divide(0,0));
}
public static decimal Divide(int x, int y)
try
return x / y;
catch (DivideByZeroException)
return 0;
// exceptions can be chained together to handel mutliple types of exceptions
catch (Exception)
return 1;
finally
Console.WriteLine("Code in a finally block is exceuted always.");