How to check the same record at the array?
-
i have an array storing Employee ID like 1,2,3,4,5,6.. how do i check whether the array have same employee Id or not? i means, if the array store 4,2,4,1,5... then return false if the arrat store no repeat employee id, like 1,5,2,6,.. then return true how i check this array?
Best regards, Chee ken
-
i have an array storing Employee ID like 1,2,3,4,5,6.. how do i check whether the array have same employee Id or not? i means, if the array store 4,2,4,1,5... then return false if the arrat store no repeat employee id, like 1,5,2,6,.. then return true how i check this array?
Best regards, Chee ken
-
If you first sort the array, you can easily loop through it to look for duplicates, as they are then next to each other.
--- It's amazing to see how much work some people will go through just to avoid a little bit of work.
-
Use the Array.Sort method.
--- It's amazing to see how much work some people will go through just to avoid a little bit of work.