摘要: public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) { return 阅读全文
posted @ 2021-11-16 16:29 vba是最好的语言 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 源码: public static TSource First<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { if (source == null) throw Error.ArgumentNu 阅读全文
posted @ 2021-11-16 16:26 vba是最好的语言 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 源码: public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second) { if (first == null) throw Error. 阅读全文
posted @ 2021-11-16 16:25 vba是最好的语言 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 源码: public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source) { if (source == null) throw Error.ArgumentNull("source"); r 阅读全文
posted @ 2021-11-16 16:23 vba是最好的语言 阅读(30) 评论(0) 推荐(0) 编辑
摘要: public class People { private string _Name = "小明"; public string Name { get { return _Name; } set { _Name = value; } } private int _Age = 15; public i 阅读全文
posted @ 2021-11-16 16:15 vba是最好的语言 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 源码: public static IEnumerable<TResult> Empty<TResult>() { return EmptyEnumerable<TResult>.Instance; } // // We have added some optimization in SZArray 阅读全文
posted @ 2021-11-16 16:05 vba是最好的语言 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 源码: public static TSource ElementAt<TSource>(this IEnumerable<TSource> source, int index) { if (source == null) throw Error.ArgumentNull("source"); IL 阅读全文
posted @ 2021-11-16 15:50 vba是最好的语言 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 源码: public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source) { if (source == null) throw Error.ArgumentNull("source"); r 阅读全文
posted @ 2021-11-16 15:34 vba是最好的语言 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 源码: public static IEnumerable<TSource> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source) { return DefaultIfEmpty(source, default(TSource)); } 阅读全文
posted @ 2021-11-16 15:18 vba是最好的语言 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 分析一个Microsoft Docs文档案例: 地址:ICollection<T> 接口 (System.Collections.Generic) | Microsoft Docs using System; using System.Collections; using System.Collec 阅读全文
posted @ 2021-11-16 13:58 vba是最好的语言 阅读(67) 评论(0) 推荐(0) 编辑