Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-17
5
Medium Priority
?
3,143 Views
Last Modified: 2013-12-17
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
Comment
Question by:karakav
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:divyeshhdoshi
ID: 22738884
This method will return true(bool) if specified element is available in list , False otherwise



0
 
LVL 4

Author Comment

by:karakav
ID: 22738975
Yeah, I know that. My question is that the Contains methods does not know how to compare my custom objects.
0
 
LVL 13

Expert Comment

by:crazyman
ID: 22739114
0
 
LVL 13

Accepted Solution

by:
crazyman earned 2000 total points
ID: 22739138
Ooops misread the question, ignore that...

this may be more help

http://forums.asp.net/t/1088225.aspx
0
 
LVL 4

Author Closing Comment

by:karakav
ID: 31507075
Thanks.
0

Featured Post

Google Certified Professional - Cloud Architect

This course (1 of 3) is designed to help students who are interested in Google Cloud Platform (GCP) to become familiar with the platform, navigate the console and learn its capabilities. It will also prepare students for the Google Cloud Architect certification exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question