同一个list集合,根据某个字段去重
gradeSubjectItem teacher = teacherInfos.Where((x, i) => teacherInfos.FindIndex(z => z.guid == x.guid) == i).ToList();
不同list集合,根据另一个包含的内容去重
//要被去重的list集合
detailInfoList
//所需要去重的一些数据
List<string> deletelist = new List<string>() { "m_consumablerecord", "m_treatmentrecord", "ttask", "ttelephoneinfo", "talarmcall", "tcommandrecord" };
//执行去重
detailInfoList.RemoveAll(c=> deletelist.Contains(c));