Lecture overview -- Keyboard shortcut: 'u'  Previous page: Upcasting and downcasting in C# -- Keyboard shortcut: 'p'    Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Specialization, Extension, and Inheritance - slide 40 : 40

Inheritance and Variables

Variables (fields) are inherited

Variables cannot be virtual

An illustration of "non-virtual variable access".
Similar illustration with virtual properties.
Classes for exercise.
Go to exercise
Non-virtual variables - Virtual Methods
We do not normally use public instance variables!