M
Mike Ruane-Torr
Why can't I have a static abstract method in C#?
My intention is to have a class-level method that returns a string to
supply information about inherited classes, and it is natural to make this
static so that I don't need an instance in order to call it. However,
because my class model is using a common base class, I need to make it
abstract too, so that inherited classes are forced to implement it.
Am I doing something that can be done another way, or considered 'ugly' in
OOD? Or is C# being inconsiderate?
My intention is to have a class-level method that returns a string to
supply information about inherited classes, and it is natural to make this
static so that I don't need an instance in order to call it. However,
because my class model is using a common base class, I need to make it
abstract too, so that inherited classes are forced to implement it.
Am I doing something that can be done another way, or considered 'ugly' in
OOD? Or is C# being inconsiderate?