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 Intermediate C#!
You have completed Intermediate C#!
Preview
Static classes can't be instantiated or inherited, but they have their purpose.
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
be accessed from any class without having
an instance of a class to work with.
0:00
This is what static classes are for.
0:01
Static classes can't inherit
from any other class.
0:04
Nor can static classes be inherited from.
0:07
We also can't instantiate a static class.
0:09
Instead of working with
objects of the class,
0:12
we work directly with the class itself.
0:15
An example of a static class in the .NET
framework is the System.Math class.
0:17
System.Math is simply a group of
math functions that can be called.
0:22
We call them directly on
the Math class itself.
0:27
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