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

Element Operators

时间:2017-02-06 23:43:14      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:ati   lock   cond   asto   contain   returns   operator   default   cti   

ElementAt

Returns the element at a specified index in a collection

ElementAtOrDefault

Returns the element at a specified index in a collection or a default value if the index is out of range.

First

Returns the first element of a collection, or the first element that satisfies a condition.

FirstOrDefault

Returns the first element of a collection, or the first element that satisfies a condition. Returns a default value if index is out of range.

Last

Returns the last element of a collection, or the last element that satisfies a condition

LastOrDefault

Returns the last element of a collection, or the last element that satisfies a condition. Returns a default value if no such element exists.

Single

Returns the only element of a collection, or the only element that satisfies a condition.

SingleOrDefault

Returns the only element of a collection, or the only element that satisfies a condition. Returns a default value if no such element exists or the collection does not contain exactly one element.

Element Operators

标签:ati   lock   cond   asto   contain   returns   operator   default   cti   

原文地址:http://www.cnblogs.com/wuyicqb/p/6371934.html

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