ObservableCollection<Person> Persons = new ObservableCollection<Person>();
Persons.Add(new Person() { Name = "John 1", Age = 25, City = "New Delhi", Email ="[email protected]" });
Persons.Add(new Person() { Name = "John 2", Age = 25, City = "New Delhi", Email = "[email protected]" });
Persons.Add(new Person() { Name = "John 3", Age = 25, City = "New Delhi", Email = "[email protected]" });
Persons.Add(new Person() { Name = "John 4", Age = 25, City = "New Delhi", Email = "[email protected]" });
Persons.Add(new Person() { Name = "John 5", Age = 25, City = "New Delhi", Email = "[email protected]" });
Persons.Add(new Person() { Name = "John 6", Age = 25, City = "New Delhi", Email = "[email protected]" });
ObservableCollection<Person> PersonsNew = new ObservableCollection<Person>();
我的問題是,
PersonsNew
=跳過3和Persons
取4和PersonsNew
存儲作爲ObservableCollection<Person>
但不爲Var
過濾器可觀察到的ObservableCollection - WPF
注:仔細閱讀輸出應該在ObservableCollection<Person>
編輯: 見,Persons
的ObservableCollection,我已經在它的Person類增加6個成員,現在我需要從它filterd人並將其存儲在Person類的新的ObservableCollection說PersonNew
感謝。 .......
我不知道你的問題是什麼? – 2011-05-28 10:46:56
請參閱Persons ObservableCollection,我已經在Person類中添加了6個成員,現在我需要從它中過濾出來並將其存儲在Person類的新ObservableCollection中,請說PersonNew謝謝..... – Pritesh 2011-05-28 10:49:15