list 去重复项
来源:互联网 发布:淘宝有哪些官方手办店 编辑:程序博客网 时间:2024/05/04 21:24
msdn
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Test{ public enum Id { Big = 1, Middle = 2, Small = 3 } class Student { public Student(String name, int age) { this.Name = name; this.Age = age; } public string Name{ get;set; } public int Age{ get;set; } } class Program { static void Main(string[] args) { List<Id> list = new List<Id>{ Id.Big, Id.Middle, Id.Small, Id.Middle, Id.Big }; List<Student> stuList = new List<Student>{ new Student("小明", 25), new Student("小华", 35), new Student("小明", 45), }; var newList = list.Distinct(); var newStuList = (from p in stuList select p.Name).Distinct(); foreach (Id obj in newList) { Console.WriteLine(Convert.ToInt32(obj)+" --- "+obj.ToString()); } foreach (string Name in newStuList) { Console.WriteLine(Name); } Console.Read(); } }}
- list 去重复项
- List去重复
- list 去重复
- list去重复
- list 去重复
- List去重复元素
- list去重复
- c# list 去重复
- List集合去重复
- List数组去重复
- List集合去重复
- List集合去重复
- List 去重复
- python list去重复值
- Java List去重复数据
- List去重复帮助类
- List自定义实体去重复
- 两个list比较,去重复
- 寒假前刷题(9)搜索系列 bfs hdu 1312
- PC-lint安装与集成(检查Unix环境代码)(一)
- 【NPC】18、团问题规约到子图同构问题
- Ubuntu下mini2440的系统烧写
- 解决Android项目中的 import android.opengl.Object3D; 的错误
- list 去重复项
- Spring_008_AOP_XML
- 毕业项目小结
- 模板方法模式深度解析(二)
- 程序员的学习和积累
- MSP430 LCD控制器解释
- unity3d 中让JS访问C#脚本的方法
- 近期计划
- 【NPC】19、汉密尔顿路径规约到有界度生成树问题