2, the public static IEnumerable
There are several questions:
1, Where method parameter is Function
2, read a book on the sample, as follows:
Int sum1=nums. Where (n=& gt; N % 4==0). The Sum ();
Behind the nums operator, belong to call the method that collection objects,
Sometimes don't use the dot operator, for example:
Var result=the from b in ds. Tables [r]. "tb_Bookinfo AsEnumerable () where b. ield
Aelect new
{
.
}
CodePudding user response:
In the second case, usage such as SQL statements, rather than function,CodePudding user response:
The where (query expression)Except for generic constraint, where also commonly used in the query expression,