Solved

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

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

832 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