Solved

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

Posted on 2008-10-17
5
3,132 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
  • 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 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now