私は2つのリストを比較しようとしています。あなたは助けてくれますか?2つのリストを比較する簡単な方法<String>リストをユニークな値に保ちます。
私が交差点を行う方法を知っているが、私は実際にそれはあなたが「そのリスト」によって何を意味するかは明らかではないのですが、私はあなたがExcept
をしたいと思う反対
//Example
List<String> baseListCopy = new List<String>();
baseListCopy.Add("Test1");
baseListCopy.Add("Test2");
baseListCopy.Add("Test3");
baseListCopy.Add("Test4");
baseListCopy.Add("Test5");
baseListCopy.Add("Test6");
baseListCopy.Add("Test7");
baseListCopy.Add("Test8");
baseListCopy.Add("Test9");
List<String> resultListCopy = new List<String>();
resultListCopy.Add("Test1");
resultListCopy.Add("Test2");
resultListCopy.Add("Test3");
resultListCopy.Add("Test40");
resultListCopy.Add("Test90");
//returns only items that are present on both lists
resultListCopy = baseListCopy.Intersect(resultListCopy, StringComparer.InvariantCultureIgnoreCase).ToList();
//How do I return only items that are unique to that list?
『リストのいずれにも表示されない項目は』:それはたくさんのです文字列... –