Actually, in some cases you can configure attributes at runtime - for example, through TypeDescriptor- but this only affects the use of the ComponentModel, and not the use of reflection. You can also write an attribute to do things like resx search for i18n targets.
But other options:
- possibly a static property, possibly after a naming convention
- a separate object model that talks about types is a metamodel, so to speak
- configuration file or similar
Any work will work; which best depends on what you mean.
source
share