View Single Post
  #1 (permalink)  
Old June 5th, 2003, 02:02 PM
Mike2000 Mike2000 is offline
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Searching ArrayList

Having problem in search of arraylist, following is the explanation.

Following is the contact class:

Public class contact()
  LastName as string
  FirstName as string
  Age as integer
End Class

I created a arraylist name as a1 and stores contact info in it.

dim a1 as arraylist
a1.Add(New contact(lastname,firstname,age))

Have following Search Criteria for user:

Name contains:
age:

Would like to search what ever user entered in the Name contains and age input. (e.g: if user enterd "A" as name contains and 28 as age, search would bring all the contacts which have "A" in either first or last name with age 28)

Question is Could "IndexOf" be used to search(like the above criteria) in arraylist of objects(contacts)? and if so any hint would be apprecitated.

Thanks,
Reply With Quote