Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed C# Objects!
You have completed C# Objects!
Preview
We can use inheritance to create our own types of exceptions.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Exception classes
are typically very small.
0:00
Sometimes when you have some small
classes that are very closely related to
0:00
each other it makes sense to
put them in the same file.
0:04
Let's create a file called,
Exceptions.cs to hold our exception types.
0:07
These exceptions will be specific
to the TreehouseDefense game, so
0:13
we'll put them in
the TreehouseDefense namespace.
0:17
One of the problems we have with
using System.Exception class is,
0:23
we don't know what code through it.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up