摘要:
源码: public static int Count<TSource>(this IEnumerable<TSource> source) { if (source == null) throw Error.ArgumentNull("source"); ICollection<TSource> 阅读全文
摘要:
源码: public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value) { ICollection<TSource> collection = source as ICollection<TS 阅读全文
摘要:
源码: public static IEnumerable<TSource> Concat<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second) { if (first == null) throw Error. 阅读全文
摘要:
源码: public static IEnumerable<TResult> Cast<TResult>(this IEnumerable source) { IEnumerable<TResult> typedSource = source as IEnumerable<TResult>; if 阅读全文
摘要:
public static float? Average(this IEnumerable<float?> source) { if (source == null) throw Error.ArgumentNull("source"); double sum = 0; long count = 0 阅读全文
摘要:
官网上给的案例: // Custom class. class Clump<T> : List<T> { // Custom implementation of Where(). public IEnumerable<T> Where(Func<T, bool> predicate) { Conso 阅读全文
摘要:
相关源码: public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { if (source == null) throw Error.ArgumentNull( 阅读全文