Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 简单Windows。使用framework 4.0时表单绑定失败_.net_Winforms_Data Binding_.net 4.0 - Fatal编程技术网

.net 简单Windows。使用framework 4.0时表单绑定失败

.net 简单Windows。使用framework 4.0时表单绑定失败,.net,winforms,data-binding,.net-4.0,.net,Winforms,Data Binding,.net 4.0,这在.NETFramework3.5客户端下工作 在.net framework 4.0客户端下,此操作失败 我是在做一些3.5下不合法的事情,但恰好工作,还是这是一个bug 请注意,在我的项目中,“Procent”不会引发更改事件 使用ctx[obj1.PropObj2,“propent”]不是一个选项 public class Obj1 { public Obj2 PropObj2 { get; set; } public Obj1() { Prop

这在.NETFramework3.5客户端下工作

在.net framework 4.0客户端下,此操作失败

我是在做一些3.5下不合法的事情,但恰好工作,还是这是一个bug

请注意,在我的项目中,“Procent”不会引发更改事件 使用ctx[obj1.PropObj2,“propent”]不是一个选项

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"];
    }
}

这看起来像PropertyManager.GetItemProperties(PropertyDescriptor[]listAccessors)中的一个bug