Android Question indexOf type

Prosg

Active Member
Licensed User
Longtime User
B4X:
Type Person(guid as string, Name As String, Age As Int)

If i want to search if a guid is already in the list how can i do this ?

i try

B4X:
if persons.IndexOf(myGuid) <> -1


but it always return -1

ty for help
 

DonManfred

Expert
Licensed User
Longtime User
IndexOF need a string and the list must be strings.

Write a helper sub which iterats through your list of cusomTYPEs and find the right one...
 
Upvote 0
Top