So, I have a simple structure Pointwith two doubles Xand Y. I calculated an array of about three hundred of them and set this array as ItemsSource for ListView in WPF. This call eventually calls a StackOverflowException.
The debugger is debugged at the beginning of the method Equalsin my structure, which I implemented like this (if this is important):
public override bool Equals(object obj)
{
if (obj is Point)
return Equals(obj);
return false;
}
public bool Equals(Point other)
{
return this.x == other.x && this.y == other.y;
}
If I changed this to the following:
public override bool Equals(object obj)
{
return false;
}
Nothing happens and the numbers are displayed. I really don’t know what I did wrong, so I don’t know how to fix it. Any pointers?
source
share