|You can't modify attributes at runtime. You can, however, use an
ICustomTypeDescriptor to return an array of attributes that you can create at runtime (note, this interface is only used by certain classes like the
See the documentation for
ICustomTypeDescriptor.GetAttributes for more information.
If you use reflection instead of a
TypeDescriptor to get attributes, you won't be able to change anything unless you programmatically create an attribute and add it to your array/list/collection.
Finally, if this is a custom attribute, you can give the attribute's property a
set accessor as well, but this is to change only a property. This is highly NOT recommend, though, because attributes are meta-data that describe classes, etc. The attributes in the base class library don't allow such changes. If you need to modify values like this, you should consider a abstract or virtual property for a particular type that child classes can override, or using an interface for a good polymorphic design.
-----BEGIN GEEK CODE BLOCK-----
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----