Lecture overview -- Keyboard shortcut: 'u'  Previous page: Examples of type test and type conversion -- Keyboard shortcut: 'p'  Next page: Practical use of virtual methods in C# -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 35 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Virtual methods in C#

A systematic illustration of the modifiers virtual, override, and new

/user/normark/oop-csharp-1/sources/c-sharp/inheritance/virt.csAn illustration of virtual and new methods in class A and B.


/user/normark/oop-csharp-1/sources/c-sharp/inheritance/virt-simplified.csAn illustration of virtual and new methods in class A and B - Simplified.


/user/normark/oop-csharp-1/sources/c-sharp/inheritance/virt-outputOutput from the program that illustrates virtual and new methods.


/user/normark/oop-csharp-1/sources/c-sharp/inheritance/virt-more-simplified.csAn illustration of virtual and new methods - More simplified.


/user/normark/oop-csharp-1/sources/c-sharp/inheritance/virt-output-more-simplifiedOutput from the more simplified program.


Virtual methods use dynamic binding

Properties and indexers can be virtual in the same way as methods