using System;
namespace Example60
{
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
int num = 13, denominator = 1, result = 0;
int[] array = { 22, 33, 44 };
try
{
result = num / denominator;
result = array[num];
}
catch (DivideByZeroException e)
{
Console.WriteLine("got here: " + e.ToString());
}
catch (IndexOutOfRangeException ee)
{
Console.WriteLine("In second catch block: " + ee);
}
Console.WriteLine("result= " + result);
}
}
}