by
Prashant
25. December 2009 03:25
For more details and detailed explaination of the code visit this link.
static List removeDuplicates(List inputList)
{
Dictionary uniqueStore = new Dictionary();
List finalList = new List();
foreach (string currValue in inputList)
{
if (!uniqueStore.ContainsKey(currValue))
{
uniqueStore.Add(currValue, 0);
finalList.Add(currValue);
}
}
return finalList;
}
If you enjoyed this post, make sure you subscribe to my RSS feed!