View On GitHub
reading-notes
Reading Notes for Codefellows!
Project maintained by
AlanYHung
Hosted on GitHub Pages — Theme by
mattgraham
Code 401 ASP.NET
Reading 06
(All My Notes are attributed/sourced from the Resources directly preceding them.)
Summary
Class inheritance allows you to modify and expand the functionality of existing classes.
Classes can contain virtual classes that allow developers to override their definition and implementation.
Abstract classes cannot be instantiated.
The purpose of an abstract class is to provide a common definition base for other classes.
A Sealed Class prevents derivation, therefore sealed classes cannot be used as a base or abstract class.
Polymorphism occurs when a derived class is instantiated as the base class.
This makes the declared type different than the run-time type
Virtual members in the base class is what enables Polymorphism
Object-Oriented Programming has 4 key techniques:
Abstraction
Encapsulation
Inheritance
Polymorphism
C# is an Object-Oriented Language
Resources
Inheritance (C# Programming Guide)
Author: Microsoft Docs
Article Source
Abstract and Sealed Classes and Class Members (C# Programming Guide)
Author: Microsoft Docs
Article Source
Polymorphism (C# Programming Guide)
Author: Microsoft Docs
Article Source
Object-Oriented programming (C#)
Author: Microsoft Docs
Article Source
C# 7.0 in a Nutshell (Chapter 3)
Authors: Joseph Albahari & Ben Albahari
<– Back