這就是場景。我有下一節(jié)課:class A{ string attribute1; string attribute2; List<B> attribute3;}class B { string attribute1;}我的程序運行:list<Class A> myList我想得到,使用 linq 過濾,一個特定的列表 A 類因此,就我所知,我正在通過以下方式獲取列表或列表:myList.SelectMany(o => o.attribute3.Where(p => p.attribute1 == "test")).ToList()myList.SelectMany(o => o.attribute3.Select(p => p.attribute1 == "test")).ToList()有什么線索嗎?謝謝小伙伴。
如何獲取過濾列表?
慕運維8079593
2021-06-30 14:07:52