Link to home
Start Free TrialLog in
Avatar of karakav
karakav

asked on

.NET,C#:List<T> contains for lookup custom objects

Does any one know how I can take advantage of the Contains() method of a generic List class to look up whether my collection of custom objects contains a specific element?
Avatar of divyeshhdoshi
divyeshhdoshi

This method will return true(bool) if specified element is available in list , False otherwise



Avatar of karakav

ASKER

Yeah, I know that. My question is that the Contains methods does not know how to compare my custom objects.
ASKER CERTIFIED SOLUTION
Avatar of crazyman
crazyman
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of karakav

ASKER

Thanks.