There are two lists
var buffList1 = new List<string>(){"1~2~3","13~23~123"}; var buffList2 = new List<string>(){"1~3~4","1~3~5"};
To select unique values I do this.
var rezList = buffList1.Except(buffList2).Union(buffList2.Except(buffList1)).ToList();
Interested in using the Except
and Union
methods for custom fields, i.e. Let's say there are 2 lines in the lists - "1 ~ 2 ~ 3" and "2 ~ 5 ~ 3". Split ('~') strings must be made and these two methods applied to values 2 and 5 .
Currently, Except and Union are working all along the line. How to override them?
IEqualityComparer
. - VladD pm