c# object list contains object returns incorrect boolean

47

c# object list contains object returns incorrect boolean -

// You need to implement the following interface to your object
public class Car: IEquatable<Car>
{
    ......
    
    public bool Equals( Car other )
    {
        return this.CarID  == other.CarID && this.CarName == other.CarName;
    }
}

Comments

Submit
0 Comments