Upcoming SlideShare
×

# Mark linq queries and operators

311 views
233 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
311
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Mark linq queries and operators

1. 1. Linq Queries & Operators 2014/1/9 Mark Chen 1
2. 2. Enumerable Method Select<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>) SelectMany<TSource, TResult>(IEnumerable<TSource>, Func<TSource, IEnumerable<TResult>>) Concat<TSource> Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) Where<TSource>(IEnumerable<TSource>, Func<TSource, Int32, Boolean>) OrderBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>) OrderByDescending<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>) ThenBy<TSource, TKey>(IOrderedEnumerable<TSource>, Func<TSource, TKey>) ThenByDescending<TSource, TKey>(IOrderedEnumerable<TSource>, Func<TSource, TKey>) 2014/1/9 2
3. 3. Enumerable Method Reverse<TSource> ToArray<TSource> ToList<TSource> Contains<TSource>(IEnumerable<TSource>, TSource) Count() Sum() Max() Min() 2014/1/9 3
4. 4. Enumerable Method Average() Aggregate<TSource>(IEnumerable<TSource>, Func<TSource, TSource, TSourc e>) Take<TSource>() Skip<TSource>() First<TSource>(IEnumerable<TSource>) FirstOrDefault<TSource>(IEnumerable<TSource>) Last<TSource>(IEnumerable<TSource>) LastOrDefault<TSource>(IEnumerable<TSource>) 2014/1/9 4
5. 5. Enumerable Method Range() Repeat<TResult>() ElementAt<TSource> ElementAtOrDefault<TSource> Empty<TResult> DefaultIfEmpty<TSource>(IEnumerable<TSource>) All<TSource> Any<TSource>(IEnumerable<TSource>) 2014/1/9 5
6. 6. 尚未了解的部分 AsQueryable() AsEnumerable<TSource>() AsQueryable(IEnumerable) AsQueryable<TElement>(IEnumerable<TEle ment>) 2014/1/9 6
7. 7. 尚未了解的部分 Cast<TResult>() OfType<TResult>() 2014/1/9 7