how to find a items in array [Resolved]

Posted by Vforvijay under ASP.NET on 2/16/2011 | Points: 10 | Views : 3938 | Status : [Member] | Replies : 2
hi...
in this array
dim value as string()
in this value its contains number of string ,just i want to check whether "the" is present in the array or not...
how to find this one in vb.net...




Responses

Posted by: Madhu.b.rokkam on: 2/16/2011 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Dim val() as string = {"a","b","c"}
Dim lst as new List(Of String)
lst.addrange(val)

textbox1.text = lst.contains("b")

This will return true


Thanks and Regards
Madhu

Vforvijay, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 2/16/2011 [Member] Starter | Points: 25

Up
0
Down
thanks its works......

Vforvijay, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response