I inherited this code and it gets a list of employees and adds them to the array masterEmployeeList.
But as it loads, it also is checking to see if it found someone already. it sdoes this by looping thru the entire list it is building every time to find them. is there a way to use something like >>>
Array.FindAll(masterEmployeeList, New ArrayComparer(thisEmployee.strEid).Contains)
so it can instantly find them or not
if so how?
TIA
DougP
But as it loads, it also is checking to see if it found someone already. it sdoes this by looping thru the entire list it is building every time to find them. is there a way to use something like >>>
Array.FindAll(masterEmployeeList, New ArrayComparer(thisEmployee.strEid).Contains)
so it can instantly find them or not
if so how?
Code:
Dim thisEmployee As Employee = New Employee
thisEmployee.strEid = thisResult.Properties("vzeid")(0).ToString()
[highlight #FCE94F] For Each existingEmployee As Employee In masterEmployeeList
If existingEmployee.strEid = thisEmployee.strEid Then
Exit Sub
End If
Next[/highlight]
thisEmployee.strVzid = thisResult.Properties("vzid")(0).ToString()
thisEmployee.strName = thisResult.Properties("cn")(0).ToString()
....
TIA
DougP