Answers:
ObservableCollection <T>具有一个构造函数重载 ,该重载使用IEnumerable <T>
清单示例int
:
ObservableCollection<int> myCollection = new ObservableCollection<int>(myList);
清单清单的另一个示例ObjectA
:
ObservableCollection<ObjectA> myCollection = new ObservableCollection<ObjectA>(myList as List<ObjectA>);