views:

27

answers:

1

This works under the .net framework 3.5 client.

This fails under the .net framework 4.0 client.

Was I doing something that was illegal under 3.5 but just happened to work, or is this a bug?

Note that in my project 'PropInt' does not raise change events so using ctx[obj1.PropObj2, "PropInt"] is not an option.

public class Obj1
{
    public Obj2 PropObj2 { get; set; }

    public Obj1()
    {
        PropObj2 = new Obj2();
    }
}

public class Obj2
{
    public int PropInt { get; set; }
}

static class Program
{
    [STAThread]
    static void Main()
    {
        var ctx = new BindingContext();
        var obj1 = new Obj1();
        var x1 = ctx[obj1, "PropObj2.PropInt"];
    }
}
A: 

This is looking like a bug in PropertyManager.GetItemProperties(PropertyDescriptor[] listAccessors).

jyoung