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

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