随笔分类 -  遇到的怪问题

.net找List1和List2的差集
摘要:有个需求是找两个自定义类泛型集合的差集:class Person{ public string Name{get; set;} public string Country{get; set;}}判断依据仅仅是Name是否相同,于是重写该类的Equals和GetHashCode方法:class P... 阅读全文

posted @ 2014-12-11 15:37 邓绍俊 阅读(665) 评论(0) 推荐(0)

.net 模糊匹配路径
摘要:string[] fileNames = Directory.GetFiles("D:/", "*1.txt"); // 路径,模糊文件名 ; 返回符合的文件名(string数组)foreach (var path in fileNames) ... 阅读全文

posted @ 2014-12-09 10:15 邓绍俊 阅读(466) 评论(0) 推荐(0)

导航