Here is what I am trying to do:
Compare every row of compareList with every row of refList
----- Do you find 'Leistungscode' of compareList in refList?
----- Yes--> Ignore
----- No--> New Entry, add to resutList
My problem is that with my for each loop, it creates a new entry every time when Leistungscode
doesn't match up, but I need to look through the whole refList
first and then add it to the list if I haven't found it. Do you have any idea how to do it?
Here is what I tried:
For Each rowCompare In compareList
For Each rowRef In refList
If rowCompare.Leistungscode.CompareTo(rowRef.Leistungscode) = 0 Then
Else
resultList.Add(New ISAACService(rowCompare.Leistungscode, rowCompare.K_Art, rowCompare.UANR, rowCompare.Ueberbegriff, rowCompare.Benennung, rowCompare.Anzahl, rowCompare.Einheit, rowCompare.Einzelkosten, rowCompare.Summencode))
End If
Next
Next