Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Setting readonly property #36

Open
drvic10k opened this issue Jun 12, 2013 · 0 comments
Open

Setting readonly property #36

drvic10k opened this issue Jun 12, 2013 · 0 comments

Comments

@drvic10k
Copy link
Contributor

In method ConvertData, property.SetValue(data, value, null); tries to set value for a readonly property. This doesn't throw an exception on .NET 4.0, but on .NET 4.5 it does.

The obvious solution is checking if you can wtite to the property:
if (property.CanWrite) { property.SetValue(data, value, null); }

This seems to be critical bug, I wonder if anyone else encountered this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant