Answers for "c# code how to remove list string with the same value"

C#
1

c# list remove duplicate items

List<string> lstWhitDuplicate = new list<string>();
lstWhitDuplicate.add("hallo");
lstWhitDuplicate.add("hallo");
lstWhitDuplicate.add("World");

List<string> lst = lstWhitDuplicate.Distinct().ToList(); 

// output lstWhitDuplicate:
// hallo hallo world
// output lst:
// hallo word
Posted by: Guest on August-14-2021
1

c# remove items from one list that are in another

destinationList = destinationList.Except(excludeList).ToList();
Posted by: Guest on January-20-2021

Code answers related to "c# code how to remove list string with the same value"

C# Answers by Framework

Browse Popular Code Answers by Language