This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Lesson 9 (Exceptions & Build Tools)
Sally Steuterman edited this page Jul 28, 2020
·
1 revision
- How to handle an exception in C#.
- Common exceptions in C#
- What MSBuild is.
- How Visual Studio manages packages with NuGet.
- How to use debugging tools in Visual Studio.
- Remind students that Assignment #3 is open for them to start working on it!
- Check with your course manager for any other important announcements.
- 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.
- Share an exception example and go over the following:
- How you decided which exception to use
- How you decided what code to put in
try
statement and what code to put incatch
statement. - Does it include a
finally
statement? Why or why not?
- Review MSBuild and NuGet. Go over what each one does and why each one matters.
- Show how to use debugging tools in Visual Studio to see the Call Stack, add breakpoints, and address common problems.
- Students will be sharing their errors and trying to use debugging tools on
HelloASPDotNETDemo
. Some things to keep in mind:- 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
- 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.
- 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.