Using Linq select list inside list

前端 未结 4 1510
清歌不尽
清歌不尽 2021-02-04 04:08

Using LINQ how to select from a List within a List

public class Model
{
    public string application { get; set; }

    public List users { get; se         


        
4条回答
  •  攒了一身酷
    2021-02-04 04:44

    After my previous answer disaster, I'm going to try something else.

    List usrList  = 
    (list.Where(n => n.application == "applicationame").ToList());
    usrList.ForEach(n => n.users.RemoveAll(n => n.surname != "surname"));
    

提交回复
热议问题