Implement exception handling in C# console applications

Beginner
Developer
Higher Education Educator
K-12 Educator
Student
.NET
Visual Studio Code

Learn about exceptions, the exception handling process supported by C#, and then implement exception handling patterns for various coding scenarios.

Learning objectives

  • Examine the basic categories of exceptions and review some common system exceptions.
  • Examine the exception handling tools included with C# and techniques for using these tools.
  • Implement the try-catch pattern within various coding scenarios.

Prerequisites

  • An installation of Visual Studio Code that's configured for C# application development.
  • Ability to develop C# console applications that implement business logic using iteration statements, selection statements, and custom methods.
  • A basic understanding of the relationship between errors and exceptions in C#.
  • Experience using the Visual Studio Code debugging tools for C#.