I'm trying to remove matching items from a list, which seems like a pretty simple task, but as luck would have it, I can't figure it out.
Example list:
List<int> points1 = new List<int>
{
1, 2, 3, 3
};
I'm trying to get uniquePoints1 to be 1,2
I know there is .Distinct() but that would return 1,2,3 which is not what I want.
I've also tried the following along with .Distinct() but I get a red line saying Comparison made to the same variable, did you mean to compare to something else?
List<int> uniquePoints1 = points1.Where(x => x == x);
List<int> uniquePoints1 = points1.RemoveAll(x => x == x);
Any help or direction is appreciated.