0
我写了一些查询 - 我想确保retList中的每个项目都会出现一次。 查询获得与集合'NamesItems'中属性'Name'相同的所有名称,并返回名称和图片的集合(列表)。我如何确定列表中的每个对象都出现一次?
我想确保每个出现在retList中的名字都会出现一次。
我该怎么办?
List<NameVIewItem> retList = null;
IEnumerable<ItemT> u = NamesItems.Where(x => x.Name == Name);
retList = (from t in ItemsCollection
join o1 in u on t.Key equals o1.Name2
select new NameViewITem (o1.Key, t.Picture), o1.Name)).ToList();
不,不,可能有不止一个画面一个名字。 – Yanshof 2011-03-21 12:59:56