Possible Duplicate:
Is there a way to force a C# class to implement certain static functions?
Consider a class and consider that, for some reasons, you need to force this class to have a constant inside it. This is to be applied to a whatever set of classes. In my specific case I need some classes of mine to have a constant inside them to hold the corresponding null value.
Those classes that, in my case, implement a certain interface because they must behave in a certain way, must also have three special values that are needed in my context (context that is too long to explain and quite useless here).
So basically I need a way to force my classes to have a certain constant inside them (accessible from outside). I know that I could simply put the constant in those classes, but what if I am looking for a way to tell the compiler: "If this class implements this interface (for example), that you should not compile it if there is not that constant!".
In this way there is the compiler checking, and not just the programmer who might forget to put the constant.
I hope I could explain my problem. Thanks in advance.