Tuesday, February 16, 2010

Interface + extension methods > abstract class

This is a very interesting approach to combine the flexibility and clarity of interface with convenience of laziness when inheriting from half-pre-build abstract class:
Extension methods as default interface method implementations

I usually in doubts every time and now I have more reasons to do the right thing and choose the interface. Very neat trick – some inheritance and some composition.

No comments:

© 2008-2013 Michael Goldobin. All rights reserved