Using Predicate of a class to Search Generic list - Faster than looping?
- by Srikanth
Lets say we have a generic list of Class1, typically having ~100 objects for a given session.
I would like to see if the list has a particular object. ASP.NET 2.0 allows me to do this:
Dim objResult as Class1 = objList.Find(objSearch)
How does this approach rate when compared to a traditional For loop, looking at a performance perspective?
How would this vary with increase or decrease in length of the list?