M
matt tagliaferri
I'm implementing a typed collection class that can't include
duplicates.
The Add method of the collection class is as follows:
Public Function Add(ByVal o As TeamListEntry) As Integer
If List.Contains(o) Then
Return -1
Else
Return List.Add(o)
End If
End Function
According to the Docs, the Contains method should call my overloaded
Equals method (below) to determine Equality, but it never gets called.
Public Overloads Function Equals(ByVal aTeam As TeamListEntry) As
Boolean
Return FTeam.Equals(aTeam.Team)
End Function
Any ideas?
matt tag
duplicates.
The Add method of the collection class is as follows:
Public Function Add(ByVal o As TeamListEntry) As Integer
If List.Contains(o) Then
Return -1
Else
Return List.Add(o)
End If
End Function
According to the Docs, the Contains method should call my overloaded
Equals method (below) to determine Equality, but it never gets called.
Public Overloads Function Equals(ByVal aTeam As TeamListEntry) As
Boolean
Return FTeam.Equals(aTeam.Team)
End Function
Any ideas?
matt tag