3
Reply

static menthods in interfaces

Sean G

Sean G

Jul 20 2007 7:07 AM
2k
I want to create an interface with static methods so i can override these in a class. I know statics are class-level, but it doesnt seem right that an interface shouldnt allow a child class to override static methods. is there a work around or a keyword im missing? The reason is that im trying to mock an interface using NMock and it only supports interfaces as mockable types. As im working with some elses code, there are very few interfaces and most classes are static upto their eyeballs

Answers (3)