×
×
Correct!
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);
}
Not CorrectClick here to try again. Correct! |
This will reset the score of ALL 58 exercises.
Are you sure you want to continue?