list string get only the diferent code example Example: unique items in list c# var uniqueItemsList = yourList.Distinct().ToList();