Can attributes be added dynamically in C#?

后端 未结 10 816
别跟我提以往
别跟我提以往 2020-11-22 14:32

Is it possible to add attributes at runtime or to change the value of an attribute at runtime?

10条回答
  •  名媛妹妹
    2020-11-22 14:49

    No, it's not.

    Attributes are meta-data and stored in binary-form in the compiled assembly (that's also why you can only use simple types in them).

提交回复
热议问题