Given the class as follows,
public class Number
{
public int X { get; set; }
public int Y { get; set; }
}
How to define an overload operato
public static bool operator ==(YourClassType a, YourClassType b)
{
// do the comparison
}
More information here. In short: