Thursday, 17 October 2013

Remove duplicates from array

int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();
 
ref: http://stackoverflow.com/questions/9673/remove-duplicates-from-array 

No comments:

Post a Comment