I have:
List<string> list = new List<string>() { "a", "a", "b", "b", "r", "t" };
How can I get only "a","b"?
I tried to do like this:
List<string> list = new List<string>() { "a", "a", "b", "b", "r", "t" };
List<string> test_list = new List<string>();
test_list = list.Distinct().ToList();
Now test_list has {"a", "b", "r", "t"}
And then:
test_list = test_list.Except(list).ToList();
So that was my fail point, cause Except() deleted all elements.
Could you help me with solution?