How to tell Reflectively if an Attribute has a public Setter
Posted
by DrLazer
on Stack Overflow
See other posts from Stack Overflow
or by DrLazer
Published on 2010-05-11T13:47:14Z
Indexed on
2010/05/11
13:54 UTC
Read the original article
Hit count: 175
c#
|reflection
Im saving an object model out to XML but when i load it back in I get exceptions when trying to use PropertyInfo.SetValue() because the property doesn't have a setter just a getter.
I want to either not save out the properties that only have getters or figure out on load whether its valid for me to try and set a value or not.
Anybody know how to do this
Cheers
© Stack Overflow or respective owner