How can I convert my list of strings:
List<string> appliedFilters = filterString.Split(',').Select(n => n).ToList();
Into a list without duplicates?
My list of strings (appliedFilters) looks like this:
7-27,
2-37,
7-28,
9-18,
9-22,
9-80
I need to output this list without duplicates in the first part of the string, e.g:
7-27-28, 2-37, 9-18-22-80
I’m sure there’s a LINQ query here somewhere, but cannot figure it out.
1 Answer