随笔分类 -  遇到的怪问题

.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 邓绍俊 阅读(644) 评论(0) 推荐(0) 编辑

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

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

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示