You can use LINQ to query any enumerable collections such as List<T>, Array or Dictionary<Tkey, TValue>

FindAll - returns a list of the actual object
Where -
Select -
First -
Last -
Reverse -

FindAll Method

Retrieves all the elements that match the conditions defined by the specific predicate

System.Collections.Generic.List<myobject> mylist; 
mylist = new System.Collections.Generic.List<myobject>
mylist.FindAll(delegate(myobject obj) { return obj.Property == true; } );

var mylist2 = from obj in mylist
           where obj.Property == true
           select obj

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrev