- Filtering Operators
Where
OfType
- Projection Operators
Select
SelectMany
- Sorting Operators
OrderBy
ThenBy
OrderByDescending
ThenByDescending
Reverse
- Join Operators
Join
GroupJoin
- Grouping Operators
GroupBy
ToLookup
- Quantifier Operators
Any
All
Contains
- Partitioning Operators
Take
Skip
TakeWhile
SkipWhile
- Set Operators
Distinct
Union
Intersect
Except
Zip
- Element Operators
First
FirstOrDefault
Last
LastOrDefault
ElementAt
ElementAtOrDefault
Single
SingleOrDefault
- Aggregate Operators
Count
Sum
Min
Max
Average
Aggregate
- Conversion Operators
ToArray
AsEnumerable
ToList
ToDictionary
Cast
- Generation Operators
Empty
Range
Repeat
Hey Programmers/developers/Engineers,
Write queries using these operators and share concepts of LINQ.
mursaleen fayyazPosted Jun 6, 2013, 1:34 PM
1. object[] data = {"one", 2, 3, "four", "five", 6};
var query = data.OfType
foreach(var s in query)
{
Console.WriteLine(s);
}
2. var names = new List
var namesWithJ = from n in names
where n.StartsWith("J")
orderby n
select n;
mursaleen fayyazPosted Jun 6, 2013, 1:04 PM
var values = Enumerable.Range(1,20).Select(n => n * 3);