Convert List to ObservableCollection in WP7

后端 未结 10 931
不知归路
不知归路 2020-12-25 10:10

I don\'t know if it\'s just too late or what, but I don\'t see how to do this...

What I\'m expecting to do, and what the object browser says is there, is this:

10条回答
  •  星月不相逢
    2020-12-25 10:26

    To convert List list to observable collection you may use following code:

    var oc = new ObservableCollection();
    list.ForEach(x => oc.Add(x));
    

提交回复
热议问题