Mid LINQ

Remove duplicates from a list of strings?

Remove duplicates from a list of strings

var items = new List<string> { "apple", "Apple", "banana", "apple"

var distinct = items

.Distinct(StringComparer.OrdinalIgnoreCase);

More from LINQ Tutorial

All questions for this course