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 Practice Inheritance in C#!
You have completed Practice Inheritance in C#!
Preview
In this video, we'll review the solution to the fourth and final challenge.
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
In order to throw and exception in
the MediaType class constructor,
0:00
if the title parameter is set to null or
an empty string, I added an if statement.
0:02
So if () {}, and then for the condition,
0:07
I added a call to
the string IsNull orEmpty
0:12
method passing in the title parameter.
0:16
So, if the string is null or
empty method returns true,
0:22
meaning that the title
parameter is null or
0:26
empty, I added code to throw
an instance of the Exception class.
0:29
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