المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Search through list of objects.



C# Programming
04-07-2009, 01:11 PM
I have a list that consists of 'customer'-objects. Every 'customer' has a full name, address, email, and phone. Now I want to be able to do a search that lets the user type in information in a form and then perform a search based on the information the user typed in. In the form the user can type in 'first name', 'last name', 'address' and so on.

But how do I compare the information the user types in with the information stored in the 'customer' objects? If the user only types in the 'first name' and 'phone' for example the search must pick out all 'customers' that matches that.

Thanks for help!