I want to see the exaption at the console , i run this progarm :
class Program
{
static void Main(string[] args)
{
int[] arr = { 1, 3, 5, 7, 9 };
try
{
Console.WriteLine("Enter a index : ");
int index = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("The number at index "+index+" is "+arr[index]);
}
catch (Exception ex)
{
Console.WriteLine("Some error : "+ex.Message);
}
}
}
}
And i get this exaption :