Inheritance and Abstract
Classes
When one class inherits from a second class, the inherited class automatically includes all the nonprivate methods and properties of its parent class. In other words, what’s true of the parent is true of the child, but not the other way around.
Inheritance is used throughout .NET Framework. For example, every ASP.NET page inherits from the base System.Web.UI.Page
class. The only reason that you can use properties such as the IsPostback
property in an ASP.NET page is that the page derives from the base Page
class.
All classes in .NET Framework derive from the base System.Object
class. The Object
class is the great-grandmother of every other class. This means that any methods or properties of the Object
class, such ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.