linq 剔除已经添加过的关键字


//begin 剔除已经添加过的关键字
HashSet<string> mHashSet = new HashSet<string>(mKeywordUsingLst.Select(m => m.Word).Distinct());
List<RecommendWord> mRecommendWordLstExcepted = mRecommendWordLst.Where(m => mHashSet.Contains(m.Word) == false).ToList<RecommendWord>();
//end 剔除已经添加过的关键字

mRecommendWordLst.Except()

posted @ 2012-10-30 15:43  xust  阅读(116)  评论(0)    收藏  举报