【发布时间】:2018-12-10 20:43:07
【问题描述】:
有两个类:
public class Persons
{
public int Id { get; set; }
public string Name { get; set; }
public string LastName { get; set; }
public int Phone { get; set; }
public DateTime Time { get; set; }
}
public class Phones
{
public string Name { get; set; }
public int Phone { get; set; }
}
我需要使用 linq 获取 PhoneList 的 Persons 投影:
List<Persons> personList = List<Persons>{...};
List<PhoneList> phoneList = persons...
我如何获得它?
【问题讨论】:
-
所以您基本上从未接触过 LinQ,而不是搜索教程,您认为问一个问题会更好吗?还是我们缺少什么?
标签: c# list linq dictionary projection