Given a group of objects that have a common set of properties and methods in support of given domain logic, is there a way of enforcing the presence of certain static methods on these objects?
I have concluded that implementing an interface does not achieve this (methods are instance only) and that static methods can not be marked override, virtual or abstract.
Thanks in advance.
No.
(Note: In F# you can express such constraints using ‘inline’ functions and ‘^’ types (e.g. forall types T where T has a static method ToInt(T) that returns an ‘int’). The compiler effectively auto-expands each call site to the specific type.)