码迷,mamicode.com
首页 > 其他好文 > 详细

Lambda语句中创建自定义类型时,也可指定某种特定类型,方法是在new与{}之间写上类型名称

时间:2017-09-28 14:15:48      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:sele   lis   指定   创建   col   tin   定义   自定义类   color   

如:

var fc =...
ChildFath = fc.Select(c => new Child_Father { child = c.child, father = c.father }).Distinct().Where(c => c.father != c.child).ToList();

Lambda语句中创建自定义类型时,也可指定某种特定类型,方法是在new与{}之间写上类型名称

标签:sele   lis   指定   创建   col   tin   定义   自定义类   color   

原文地址:http://www.cnblogs.com/mol1995/p/7606136.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!