For each?(noob question)

jorge

Well-known member
Joined
Jul 13, 2003
Messages
239
Location
Belgium
ok, how do i use a for each statement in vb.net?

ide like to do somthing evry time a string = x

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

Code:
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