Fill in the missing parts to output an error message if an error occurs.
@(3)
{
int[] myNumbers = {1, 2, 3};
Console.WriteLine(myNumbers[10]);
}
@(5) (Exception e)
{
Console.WriteLine(e.Message);
}
try
{
int[] myNumbers = {1, 2, 3};
Console.WriteLine(myNumbers[10]);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}