Rudebox.co.nr How To Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Rudebox.co.nr How To Forums

Rudebox How To Forums - Ask Anything, View How To's
 
HomeSearchLatest imagesRegisterLog in

 

 Generic List. Remove duplicate

Go down 
AuthorMessage
Admin
Admin
Admin


Number of posts : 216
Registration date : 2007-01-01

Generic List. Remove duplicate Empty
PostSubject: Generic List. Remove duplicate   Generic List. Remove duplicate Icon_minitimeWed Nov 07, 2007 6:00 pm

Source : http://www.thescripts.com/forum/thread646397.html


Slightly modified Version

Create List

Code:
void CreateList
{

//Create/Get List

list.sort();
list.RemoveAll(RemoveDuplicate);
}

Removing Duplicates Function

Code:

private static Object temp;
private static bool RemoveDuplicate(Object currentMode)
{
bool isDuplicate;
if (temp == currentMode)
{
isDuplicate = true;
}
else
{
isDuplicate = false;
}
temp = currentMode;
return isDuplicate;

}
Back to top Go down
https://rudebox.editboard.com
 
Generic List. Remove duplicate
Back to top 
Page 1 of 1
 Similar topics
-
» Google Pack : An excellent List of Softwares for a New Comp
» how do I remove my name from Google search?
» How to remove history and cookies for free

Permissions in this forum:You cannot reply to topics in this forum
Rudebox.co.nr How To Forums :: How To - Programming-
Jump to: