Bug 32609 - PropertyInfo.CanWrite behavior difference from MS.NET
Summary: PropertyInfo.CanWrite behavior difference from MS.NET
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.0.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
: 38461 ()
Depends on:
Reported: 2015-07-30 10:11 UTC by Sandy Armstrong [MSFT]
Modified: 2016-02-04 17:25 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sandy Armstrong [MSFT] 2015-07-30 10:11:24 UTC
Suppose you have:

class Super { public long A { get; private set; } }

class Sub : Super {}

On MS.NET, typeof(Sub).GetProperty("A").CanWrite returns false (unless you s/private/protected).

On Mono, it returns true.
Comment 1 Marek Safar 2015-07-31 03:44:19 UTC
Fixed in master
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-02-04 17:25:12 UTC
*** Bug 38461 has been marked as a duplicate of this bug. ***