代码改变世界

随笔档案-2022年01月

ToLookup方法

2022-01-25 23:33 by hello,逗比, 632 阅读, 收藏,
摘要: 1、必须是实现了IEnumerable接口对象才可以调用该方法,通过ToLookup方法,返回的是ILookup<T1,KeyValuePair<T2,T3>> 对象, 筛选KeyValuePair<T2,T3>集合里符合条件的新的数据,并且生成新的集合以类型T1为key,KeyValuePair< 阅读全文

Task.Factory.StartNew和Queue应用

2022-01-17 00:34 by hello,逗比, 84 阅读, 收藏,
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace 阅读全文

Queue<T>类

2022-01-16 22:50 by hello,逗比, 48 阅读, 收藏,
摘要: class Program { static void Main(string[] args) { Queue<Person> que = new Queue<Person>(); que.Enqueue(new Person("11", 1)); //新增 que.Enqueue(new Pers 阅读全文