List泛型里怎么去除相同的数? 不能打乱已有的顺序,去掉重复的数?怎么做? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 补充下 是 Linq 里面的不要忘记引用 singlePoint.Distinct<> 我看到有这个函数 int[] a = {1, 3, 4};var b = a.Distinct();就是他 里面的可以省略 var q = from x in lst group x by x into Y where Y.Count()>1 select Y.Key; http://topic.csdn.net/u/20100604/23/d0700f64-8a1b-4684-9127-d915ea38f50b.html List<string> list = new List<string>(); list.Add("1"); list.Add("1"); list.Add("2"); list = list.Distinct().ToList<string>(); 怎样实现自己的Control基类 再来一道算术题! scope identity()、@@IDENTITY()是不是只能得到自增长的列? 调试winform程序需要一些输出,有没有什么好办法? 请大虾进来看看 vs.net2003中 CS文件和DLL文件的麻烦! PerformanceCounter能够测试网速吗 请问如何编程读取系统信息 请教:如何做一个windows服务?在哪里能找到相关的资料? 请问在Windows 2000 Sever中构建无盘工作站,在启动时如何将客户机的显示输出转到电视机上?????? 请高手讲解下二进制文件的存储机制 文件更新问题
var b = a.Distinct();
就是他 里面的可以省略
group x by x into Y
where Y.Count()>1
select Y.Key;
http://topic.csdn.net/u/20100604/23/d0700f64-8a1b-4684-9127-d915ea38f50b.html
list.Add("1");
list.Add("1");
list.Add("2");
list = list.Distinct().ToList<string>();