Menu
×
×
Correct!

Exercise:

Fill in the missing parts to execute some code, after the exception statements, regardless of the result.

try { int[] myNumbers = {1, 2, 3}; Console.WriteLine(myNumbers[10]); } catch (Exception e) { Console.WriteLine("Something went wrong."); } finally { Console.WriteLine("The 'try catch' is finished."); }

Not Correct

Click here to try again.

Correct!

Next ❯

{
  int[] myNumbers = {1, 2, 3};
  Console.WriteLine(myNumbers[10]);
}
 (Exception e)
{
  Console.WriteLine("Something went wrong.");
}

{
  Console.WriteLine("The 'try catch' is finished.");
}

  
  
  




Log in to keep your progress
Sign up to keep your progress

Completed 0 of 58 Exercises:

C# Syntax
C# Comments
C# Variables
C# Data Types
C# User Input
C# Operators
C# Math
C# Strings
C# Booleans
C# If...Else
C# Switch
C# Loops
C# Arrays
C# Methods
C# Classes/Objects
C# Exceptions

×

Reset the Score?

This will reset the score of ALL 58 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 58 C# exercises.

Share your score: