C
cody
I have a base class and I want that all derived classes must have
attributes which contains entity specific stuff like a table name and a
userfriendly class name.
For specific reasons I want these things to be accessible also without
an instance of that class.
Sure, I could implement static variables and properties in each derived
class. But How could I ensure that the people deriving from my class are
doing so and most importantly, do the signatures correctly.
So if I would use reflection to retrieve the tablename of a given class
and I look for a property named TableName but the programmer of that
class unintentionally named the property NameOfTable (or whatever).
Since these informations are per class I have to make them static so
interfaces are not of use here.
attributes which contains entity specific stuff like a table name and a
userfriendly class name.
For specific reasons I want these things to be accessible also without
an instance of that class.
Sure, I could implement static variables and properties in each derived
class. But How could I ensure that the people deriving from my class are
doing so and most importantly, do the signatures correctly.
So if I would use reflection to retrieve the tablename of a given class
and I look for a property named TableName but the programmer of that
class unintentionally named the property NameOfTable (or whatever).
Since these informations are per class I have to make them static so
interfaces are not of use here.