peter

peter

  • 0
  • 193
  • 0

compare two elements of a custom collection for equality

Dec 5 2021 9:48 PM

I have the following defined collection elements that i would like to find if their values match. They do not necessarily have the same field positions in the array but there properties are the same.
list.Item(0).Equals(list.Item(1))

I have tried implementing the Implements System.IEquatable(Of Customer) in my aspx page with following function
Public Overrides Function Equals(other As Customer) As Boolean

but it returns error saying function Equals cannot be declared Overrides because it does not override function in base class ?


Answers (2)