代码改变世界

阅读排行榜

c#里面的索引器注意

2017-06-25 11:21 by hello,逗比, 260 阅读, 收藏,
摘要: 1、特此说明,下面代码是从完整部分复制了部分,未必能直接拷贝执行。 2、索引器里注意 1)如果没有设置数组保存,不能连续访问per2[0],per[1],因为里面的比如 Name是被替换的。 2)我们创建数组保存,需要 创建空间,我们可以 3、索引器里另外灵活运用例子,将索引号不同,给对象不同字段赋 阅读全文

c#接口显式和隐式实现的区别

2021-07-08 00:26 by hello,逗比, 224 阅读, 收藏,
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 接口显式隐式实现 { class Program 阅读全文

Task.Factory.StartNew和Queue应用

2022-01-17 00:34 by hello,逗比, 82 阅读, 收藏,
摘要: 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,逗比, 45 阅读, 收藏,
摘要: class Program { static void Main(string[] args) { Queue<Person> que = new Queue<Person>(); que.Enqueue(new Person("11", 1)); //新增 que.Enqueue(new Pers 阅读全文