Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3147
  • Last Modified:

.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?
0
karakav
Asked:
karakav
  • 2
  • 2
1 Solution
 
divyeshhdoshiCommented:
This method will return true(bool) if specified element is available in list , False otherwise



0
 
karakavAuthor Commented:
Yeah, I know that. My question is that the Contains methods does not know how to compare my custom objects.
0
 
crazymanCommented:
0
 
crazymanCommented:
Ooops misread the question, ignore that...

this may be more help

http://forums.asp.net/t/1088225.aspx
0
 
karakavAuthor Commented:
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now