SELECT Name,Address FROM Customer
WHERE State = ‘CA’
If you had the same data in your application represented by objects, you could do the same kind of query using LINQ. Here is some sample syntax for selecting objects from a collection based:
Dim q = From c In Customers Where c.State = "CA" Select c.Name, c.Address
IEnumerable q = from c in Customers where c.State = "CA" select c.Name, c.Address;
The performance scales very well, and I have almost replaced iterating at this point. If you are interested, click here for information on LINQ.