Summary
Your goal was to gain experience implementing exception handling in C# applications using Visual Studio Code.
By examining the properties of common exception types and experimenting with the try-catch
pattern, you gained experience catching runtime exceptions. You used exception handling to catch exceptions in the method where they occurred and at a lower level of the call stack. You also practiced using two or more catch
clauses to catch different exception types associated with a single try
code block.
Without the ability to implement exception handling, you wouldn't be able to delivery stable and reliable C# applications.
Reference materials
You can find additional information about exception properties here: https://learn.microsoft.com/dotnet/standard/exceptions/exception-class-and-properties and https://learn.microsoft.com/dotnet/api/system.exception.
You can find additional information about exceptions here: https://learn.microsoft.com/dotnet/csharp/language-reference/language-specification/exceptions.
You can find additional information about using specific exception types here: https://learn.microsoft.com/dotnet/standard/exceptions/how-to-use-specific-exceptions-in-a-catch-block.
You can find additional information about the
try-catch-finally
patterns here: https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/try-catch-finally.
Get a free verified certification
Microsoft and freeCodeCamp.org offer a training and certification combo on foundational C#. By completing this Learn module, you've already started. Explore freeCodeCamp's Foundational C# with Microsoft certification here: https://aka.ms/csharp-certification.