List<ModelJD> data = myDalJD.GetAllDataList();
List<string> list= new List<string>();
list= datalist4.Select(p => p.name).ToList(); //只取name字段,重新生成新的List集合
this.cmbJdUserName.DataSource = list.Distinct().ToList(); //去重复,绑定数据后面要加ToList()

  


转自http://www.cnblogs.com/han1982/p/4768222.html
05-11 20:42