我有点困惑,Linq 查询中的投影操作是什么? Linq 查询中的 Select 操作何时变为投影操作? 谁能赐教一下?
最佳答案
当 select 子句生成除源元素副本之外的其他内容时,该操作称为投影。
像这样的东西叫做投影操作
var innerJoinQuery =
from cust in customers
join dist in distributors on cust.City equals dist.City
select new { CustomerName = cust.Name, DistributorName = dist.Name };
关于c# - Linq 查询中的 Select 操作何时变为投影操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20212347/