Thursday, May 28, 2015

Remove duplicate entry in listbox in C# 
 
 
 
List<string> List_new = new List<string>();
foreach (string s in originalList)
{
if (!List_new.Contains(s))
{
List_new.Add(s);
}
}
// Optionally...
originalList
= List_new;

No comments:

Post a Comment