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

Select specified items from Tuple List

时间:2015-12-17 20:37:40      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:

#Select specified items from Tuple List

##Select one item to form list

 `tupleList.Select(element => new string(element.Item1)).ToList();`

##Select one item to form list

 Now, I have a three-Tuple List and I need to select the first and third item to form a new Tuple List.

 `tupleList.Select(element => new Tuple<string, string>(element.Item1, element.Item3)).ToList();`

Select specified items from Tuple List

标签:

原文地址:http://www.cnblogs.com/wushuaiyi/p/5055134.html

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