SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 36 | Next

Scott Klein

"Professional LINQ"


There are two sets of standard query operators??”one operates on objects of the IEnumerable type
and the other operates on objects of the IQueryable type. The operators are made up of methods
that are static members of the Enumerable and Queryable classes, allowing them to be called using static
method syntax of instance method syntax. You will learn all about this in Chapter 4.
The standard query operators can be categorized by their operation ??????type.??™??™ For example, there are
aggregate, projection, ordering, and grouping operators, among others. Take a look again at one of the
examples used earlier in the chapter (repeated here for your convenience):
private void ShowLINQ()
{
string [] firstnames = { "Scott", "Steve", "Ken", "Joe", "John",
"Alex", "Chuck", "Sarah"};
IEnumerable val = from fn in firstnames
where fn.StartsWith("S")
select fn;
foreach (string name in val)
{
Console.WriteLine(name);
}
}
The actual LINQ query is the middle part:
val = from fn in firstnames
where fn.StartsWith("S")
select fn;
In this example, several query operators are utilized from different operation types.


Pages:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6