In abstract classes, you can have static (general) methods. However, you cannot have them in interfaces.
It sounds like you really need virtual static / generic methods - and they are not available. Static methods are not called polymorphically, and with the way most of .NET works, it doesn't make much sense. It would be wise to be able to specify static methods in interfaces when using them as limitations of type parameters - an idea that I wrote about earlier ....
Delphi has the concept of a metaclass, where (as I understand it) the instance methods in the class metaclass are similar to the static methods in the class itself - and one metaclass can be derived from another, overriding the methods, etc. I'm not a Delphi programmer, but chapter 2 of Delphi in a nutshell may be useful to you if you want more information.
Java allows you to define constants in interfaces, but only one type of static member is supported.
Interestingly, the CLI itself allows you to use static methods in the interface, but these methods with bodies are not only the signature provided by members of the interface instance.
Jon Skeet Dec 01 '08 at 9:22 2008-12-01 09:22
source share