[mono-android] PropertyInfo on a public property coming back as read only?
Jonathan Pryor
jonp at xamarin.com
Wed Nov 30 22:12:09 EST 2011
On Nov 30, 2011, at 10:04 PM, Josh Handel wrote:
> Would return false to PropertyInfo.CanWrite in Mono for Android when using reflections like this?
I'm going to guess that this is a Release build. If that's the case, then the setter was removed by the linker (because it wasn't used from anywhere), and this behavior differs from MonoTouch because (presumably) MonoTouch has a different code base which causes the linker to preserve the setter. WP7 doesn't have a linker, and thus this isn't an issue there.
See also: http://docs.xamarin.com/android/advanced_topics/linking
- Jon
More information about the Monodroid
mailing list