What Is Base Class - .NET?
Base Class - .NET are like your parents: they're the only ones you know, and yeah—you're pretty sure you had some other parents at some point but, now it's just them and they're all you've got. So, what does that mean for you? If you want to create a class derived from another class, then you can use a base class for that purpose. A base class (in C#) is a class that can be used to create or derive other classes. Child classes, subclasses, or derived classes are all classes derived from a base class. A base class is the parent of a derived class and does not inherit from any other class. The base class is the starting point for all classes derived from it. It's like the foundation of a house: All of the other stuff you build on top of it is dependent on that foundation holding up. When you inherit from a base class, you get two things: data and behavior. Data is the values that describe your object, and behavior is how your object acts in response to user input. Think about an animal: It has data (like its name) and behavior (like barking). A dog inherits these things from its base class—the animal class—while still being unique (some dogs bark more than others!). The Base Class is the foundation of a family tree. It's the one who knows how to make little ones, giving them all traits to inherit. It can't do much on its own, but it can sure make some great kids! It's also important to note that while we often talk about inheritance as something that happens only in classes, there are many kinds of inheritance in C#. You've already seen a few examples: methods and properties are both inherited in C# (we talked about this when we discussed polymorphism).
Related Terms by Software Development
Join Our Newsletter
Get weekly news, engaging articles, and career tips-all free!
By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.

