Specialization, Extension, and Inheritance
- slide 28 : 40
Inheritance of methods, properties, and indexers
Methods, properties, and indexers are inherited
Methods, properties, and indexers can be redefined in two different senses:
Same names and signatures in super- and subclass, closely related meanings (
virtual
,
override
)
Same names and signatures in super- and subclass, two entirely different meanings (
new
)
A method M in a subclass B can refer to a method M in a superclass A
base.M(...)
Cooperation, also known as method combination
Redefinition: Overriding or hiding
Method combination
Operators are inherited. A redefined operator in a subclass will be an entirely new operator.