[Mono-bugs] [Bug 535183] New: Autoproperty + reflection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 28 10:21:07 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=535183


           Summary: Autoproperty + reflection
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: i686
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: fatcat at ua.fm
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

Sorry guys, can't found any place in Microsoft to submit this issue..

When I try to set value to autoproperty and autoproperty have private setter,
logically, I should receive an error, but it is not happens.
Here is small test:

        public class ResultReadOnlyData
        {
            public string Data { get; private set; }
        }
        [Test]
        public void Reproduce()
        {
            ResultReadOnlyData data = new ResultReadOnlyData();
            Assert.IsNull(data.Data);
            Type t = typeof (ResultReadOnlyData);
            PropertyInfo p = t.GetProperty("Data");
            p.SetValue(data, "value", null);
            Assert.IsNull(data.Data);
        }



Reproducible: Always

Steps to Reproduce:
1. Run test
Actual Results:  
should pass

Expected Results:  
fails

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list