1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Inheritance
object-oriented principle where a child class (derived/subclass) reuses behavior of a parent class (base/superclass). C# supports only single inheritance. Uses colon (:) syntax.
Protected Members of a Class
members declared with protected are accessible by derived classes. Declared using protected keyword.
Base
keyword used to call base class constructors or methods from a derived class.
Method Overriding
defining a method in a derived class with the same name and signature as in the base class, providing new behavior. Requires base class method to be virtual or abstract. Derived class uses override.
abstract class
a class that cannot be instantiated. Declared with abstract keyword. Used to provide outline for derived classes.
abstract methods
method declarations inside abstract classes without implementation. Must be overridden in derived classes. Declared with abstract keyword and semicolon.
Polymorphism
“many forms.” Classes provide multiple methods with the same name but different behaviors.
Compile time polymorphism
achieved using method overloading (static polymorphism, early binding).
Runtime polymorphism
achieved using method overriding (dynamic polymorphism, late binding).