Answers for "delete duplicate item in list c#"

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

Code answers related to "delete duplicate item in list c#"

C# Answers by Framework

Browse Popular Code Answers by Language