Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Lesson 9 (Exceptions & Build Tools)

Sally Steuterman edited this page Jul 28, 2020 · 1 revision

Lesson 9: Exceptions and Build Tools

In the prep work this week, the students learned

  1. How to handle an exception in C#.
  2. Common exceptions in C#
  3. What MSBuild is.
  4. How Visual Studio manages packages with NuGet.
  5. How to use debugging tools in Visual Studio.

Announcements

  1. Remind students that Assignment #3 is open for them to start working on it!
  2. Check with your course manager for any other important announcements.

Large Group Time (Instructor)

Lesson 9 Topics That Require Careful Attention

  1. Much of the reading is based around debugging and handling errors. Don't be afraid to share your own experiences with debugging and your own process when it comes to using debugging tools and exception handling.
  2. Share an exception example and go over the following:
    1. How you decided which exception to use
    2. How you decided what code to put in try statement and what code to put in catch statement.
    3. Does it include a finally statement? Why or why not?
  3. Review MSBuild and NuGet. Go over what each one does and why each one matters.
  4. Show how to use debugging tools in Visual Studio to see the Call Stack, add breakpoints, and address common problems.

Small Group Time: Lesson 9 Studio (TA Notes)

  1. Students will be sharing their errors and trying to use debugging tools on HelloASPDotNETDemo. Some things to keep in mind:
    1. Don't be afraid to share your own stories of bugs and errors in your code! Emphasize that every programmer has to deal with bugs and that it gets a lot easier once you have a strategy in place and the tools
    2. Helping students figure out a process by which they can debug their code is the point of the studio. If they add a breakpoint, ask them to tell you why they put that breakpoint there.
    3. After students are done playing around with HelloASPDotNETDemo, encourage students to use debugging tools and strategies to work on some code that is giving them trouble. This could be an old set of exercises that they never quite got right, a studio, or an outstanding assignment.