什麼是這兩種方法都可以接受以同樣的方式lambda表達式個體差異在哪裏與IQueryable的<TSource>凡擴展方法
public static IEnumerable<TSource> Where<TSource>
(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
和
public static IQueryable<TSource> Where<TSource>
(this IQueryable<TSource> source,
Expression<Func<TSource, bool>> predicate)
之間的性差異。
List<string> fruits =
new List<string> { "apple", "passionfruit", "banana", "mango",
"orange", "blueberry", "grape", "strawberry" };
IEnumerable<string> query = fruits.Where(fruit => fruit.Length < 6);
爲什麼委託函數和委託函數的表達式存在?我必須關心它嗎?