Skip to content
Discussion options

You must be logged in to vote

The setter needs to exist for the runtime to set the property. That setter only changes that instance, it doesn't rewrite the metadata in the assembly, which is why the value resets when you get the attribute through reflection. If you don't want to have mutable properties in your attributes you can use a constructor instead.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kyoyama-kazusa
Comment options

Answer selected by kyoyama-kazusa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants