Public Function Validate(updatedDetailList As List(Of DetailVO)) As Boolean
Dim matchFound As Boolean = False
For Each firstUpdatedDetail In updatedDetailList
For Each nextUpdatedDetail In updatedDetailList
If firstUpdatedDetail.PROD_ID.Equals(nextUpdatedDetail.PROD_ID) Then
matchFound = True
End If
Next nextUpdatedDetail
Next firstUpdatedDetail
Return matchFound
End Function
私はupdatedDetailList
反復して現在と次のオブジェクト値を取得し、両方の値を比較したいリストとして持っています。で同じものを見つけた場合PROD_ID
は、としてupdatedDetailList
返します。matchFound
TRUE
内側の For ループで次のオブジェクトを取得する方法はありますか。お気に入り...
For Each firstUpdatedDetail In **updatedDetailList**
For Each nextUpdatedDetail In **updatedDetailList.Next**
If firstUpdatedDetail.PROD_ID.Equals(nextUpdatedDetail.PROD_ID) Then
matchFound = True
End If
Next nextUpdatedDetail
Next firstUpdatedDetail