This is a SYNTAX question for C # and NOT about how we call / use IQueryable
Can someone explain to me:
We have this declaration (System.Linq):
public static double Average<TSource>(this IQueryable<TSource> source,
Expression<Func<TSource, int>> selector)
and call the mean
double average = fruits.AsQueryable().Average(s => s.Length);
I understand how to call the Mean value and all similar static methods of IQueryable, but I do not understand the syntax of the declaration.
public static double Average<TSource>(this IQueryable<TSource> source,
Expression<Func<TSource, int>> selector)
Which means <TSource>in as well . Average<TSource>( this IQueryable<TSource> source
since only one parameter passes when we call it, and the actual lambda expression (s => s.Length);
Thanks in advance.
source
share