Finally I Virtually Understand

Bill Caputo has posted an interesting article discussing inheritance in C#, especially when using interfaces. I learned about OO while learning how to write Java, so I still struggle with the fact that methods in C# are not virtual by default. Bill explains why inheriting a class that implements an interface might not work as you expected.

The key statement here is:-

...the implementation of an interface method is implicitly 'final', just as if the 'sealed' and 'override' modifiers were present.

Anyway, worth reading. I think I might be getting myself a copy of .NET Essentials...

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.