Interface contracts – forcing code contracts through interfaces

added by gpeipman
5/9/2010 1:00:46 PM


Sometimes we need a way to make different implementations of same interface follow same rules. One option is to duplicate contracts to all implementation but this is not good option because we have duplicated code then. The other option is to force contracts to all implementations at interface level. In this posting I will show you how to do it using interface contracts and contracts class.