Bug 38461 - PropertyInfo.CanWrite can return different value on OSX than Windows
Summary: PropertyInfo.CanWrite can return different value on OSX than Windows
Status: RESOLVED DUPLICATE of bug 32609
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.4 (iOS 9.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-02-04 17:13 UTC by Alexandre Emond
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 Developer Community or GitHub 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 Alexandre Emond 2016-02-04 17:13:48 UTC
If we are running the same code on a Windows console app (with Visual Studio) VS Mac Console app or iOS App (with Xamarin Studio), we do not get the same value.  Sample code :

    class Program
        static void Main(string[] args)
            Console.WriteLine(typeof(MyClass).GetProperty("MyProperty").CanWrite);          // OK    : True (Windows), True (Xamarin Studio Console Project)
            Console.WriteLine(typeof(TestEntity).GetProperty("MyProperty").CanWrite);       // ERROR : False (Windows), True (Xamarin Studio Console Project)

    public class MyClass
        public string MyProperty
            get; private set;

    public class TestEntity : MyClass { }

In fact, it's the same issue as : https://bugzilla.xamarin.com/show_bug.cgi?id=32609 which was closed on 2015-07-31.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-02-04 17:25:12 UTC
The current stable version of Xamarin.iOS (9.4) is based on a Mono version which is from before the fix for bug #32609.

The next major release will include the fix.

*** This bug has been marked as a duplicate of bug 32609 ***