Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.71 KB

File metadata and controls

48 lines (37 loc) · 1.71 KB

Unit 1 (C#) - Lesson 08 Learning Objectives

Goals

Exceptions

  • Understand what exceptions are, how to use them and interpret them
  • Effectively throw and catch exceptions to improve user experience and make debugging easier

Local Development

  • Set up a C# development environment and execute C# programs
  • Understand the role of Visual Studio build tools in C#/.NET projects

Objectives

Exceptions

  • Explain what an exception is and why exceptions are used
    • Describe using exceptions to communicate issues to programmers, not users
    • Discuss when to use exceptions (unexpected situations, scenarios we do not want to handle ourselves)
    • Catch exceptions only when something meaningful can be done
    • Throw exceptions with clear, descriptive messages
    • Throw exceptions only when the program can not be properly executed in the given state
  • Write a program using a try/catch block
  • Explain how a finally block works and when one should be used
  • Discuss the use of checked vs. unchecked exceptions
  • Discuss how to throw an exception in C#
  • Summarize some common built-in exceptions C#
  • Describe passing exceptions in C#, when do they stop a program

Local Development

  • Install and configure Visual Studio and the .NET SDK
  • Create and run a "Hello World!" console app within Visual Studio
  • Import a C# project from GitHub into Visual Studio
  • Discuss what build tools do in the Visual Studio IDE
  • Review the major tasks of MSBuild, including creating the .``csproj`` document
  • Review the sections of the .csproj file (eg. property groups, item groups)
  • Differentiate the roles of MSBuild and NuGet