boucle 1.Do
|
Le format sont comme suit :
|
a) Do While condition
Block of one or more VB statements
Loop
b) Do
Block of one or more VB statements
Loop While condition
c) Do Until condition
Block of one or more VB statements
Loop
d) Do
Block of one or more VB statements
Loop Until condition
|
|
L'exemple suivant montre que l'utilisation de font une boucle dans VB
|
Do while counter <=1000
num.Text=counter
counter =counter+1
Loop
or
The above example can be rewritten as
Do
num.Text=counter
counter=counter+1
Loop until counter>1000
|
|
2.For�.Prochaine boucle
|
Le format est comme suit :
|
For counter=startNumber to endNumber (Step increment)
One or more VB statements
Next
|
|
L'exemple suivant montre l'utilisation de pour�.Prochaine boucle dans VB
|
(a) For counter=1 to 10
display.Text=counter
Next
(b) For counter=1 to 1000 step 10
counter=counter+1
Next
(c) For counter=1000 to 5 step -5
counter=counter-10
Next
|
|
Keywords:
Looping in VB,
visual basic looping,
asp net looping,
visual basic vb,
vb source code,
while loop in vb,
for loop in vb,
vb asp net,
looping in excel,
looping in sql,
vb array,
vb functions,
looping asp,
vb tutorials,
vb timer,
looping code,
vb dim,
vb code,
vb msgbox,
vb controls,
vb reference,
shell in vb
|