arraylist contain

B

Bob

Hi, guys

Dim myAL As New ArrayList()
myAL.Add("Monday")
myAL.Add("Tuesday")
myAL.Add("Thursday")

I want to check whether the first 3rd letters of myAL contains "Thu". Is
there an existing function I missed, as myAL.Contains("Thu") returns me
false?

Thanks.
 
D

Dominique Vandensteen

you missed nothing, what you are looking for doesn't exist
..Contains simply loops over the list and does a .equals on every object
you will need to do the same
loop over the arraylist and call .startswith on every string in the list...


hope this helps

dominique
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top