Geeks With Blogs

New Things I Learned May 2010 Entries
protected abstract override Foo(); – er... what?
A couple of weeks back, a co-worker was pondering a situation he was facing. He was looking at the following class hierarchy: abstract class OriginalBase { protected virtual void Test() { } } abstract class SecondaryBase : OriginalBase { } class FirstConcrete : SecondaryBase { } class SecondConcrete : SecondaryBase { } Basically, the first 2 classes are abstract classes, but the OriginalBase class has Test implemented as a virtual method. What he needed was to force concrete class implementations ......

Posted On Tuesday, May 4, 2010 6:25 AM

Copyright © Muljadi Budiman | Powered by: GeeksWithBlogs.net