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 98 | Next

Scott Klein

"Professional LINQ"

However, even this might not be sufficient because
there are many reasons why query syntax may not be an option:
??‘ Not all of the standard query operators are available in query syntax.
??‘ Not all of the combinations of the standard query operators are available in query syntax.
??‘ As you will read about later, it is possible to combine query syntax with method syntax, but
theremay be times when using straight method syntax might be more readable.
It is a matter of learning which standard query operators can be used with which syntax option
(query syntax and method syntax) and going from there. However, your priority should always be
syntax readability.
For example, the following code snippet shows how to author a query using query syntax.
Int[] grades = { 67, 98, 72, 85, 92, 89, 78, 76, 88};
IEnumerable topTwoGrades =
(from g in grades
orderby g
select g).Take(2);
The following code snippet shows the same query using method syntax.
Int[] grades = { 67, 98, 72, 85, 92, 89, 78, 76, 88};
IEnumerable topTwoGrades =
grades.


Pages:
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6