Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #object #list #object #returns #incorrect #boolean
ADD COMMENT
Topic
Name
9+2 =