For each?(noob question)

jorge

Junior Contributor
Joined
Jul 13, 2003
Messages
239
Location
Belgium
ok, how do i use a for each statement in vb.net?

i'de like to do somthing evry time a string = x

greets
 
You would use a for each loop to iterate over an array or collection.

Visual Basic:
dim s() as string = {"one","two","three"}

for each tmp as string in s
    Messagebox.show (tmp)
next

not sure what you meant by the every time a string = x statement though...
 
Back
Top