随笔分类 -  C# 数据结构

摘要:public interface IListDS<T> { int GetLength(); //求长度 void Clear(); //清空操作 bool IsEmpty(); //判断线性表是否为空 void Append(T item); //附加操作 void Insert(T item, 阅读全文
posted @ 2021-10-08 11:09 _MrZhu 阅读(30) 评论(0) 推荐(0)
摘要:1.数据库辅助类 using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tas 阅读全文
posted @ 2020-05-22 10:13 _MrZhu 阅读(585) 评论(0) 推荐(0)
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespac 阅读全文
posted @ 2020-05-19 15:54 _MrZhu 阅读(230) 评论(0) 推荐(0)
摘要:转载自https://www.cnblogs.com/tcjiaan/p/5700192.html 自定义实现两个对象的相等比较,一种方案是重写Object类的Equals方法,很easy,如果相等返回true,不相等就返回false。不过,如果把自定义相等的比较用于泛型集,比如Dictionary 阅读全文
posted @ 2020-05-19 10:34 _MrZhu 阅读(293) 评论(0) 推荐(0)
摘要:实现一个自定义类型,支持迭代: 把peopel看成是List<person>或person[] class people:IEnumerable { private readonly Person[] persons; public people(Person[] ps) { persons=new 阅读全文
posted @ 2020-05-15 16:42 _MrZhu 阅读(120) 评论(0) 推荐(0)