大马资讯论坛 - 马来西亚中文资讯平台
标题:
Vb.net(Win) For Loop While Loop Do Loop 教学
[打印本页]
作者:
资讯王
时间:
2010-2-3 07:31
标题:
Vb.net(Win) For Loop While Loop Do Loop 教学
For Loop
Dim d As Integer
For d = 0 To 2
MessageBox.Show("In the For Loop")
Next d
复制代码
While Loop
Dim d, e As Integer
d = 0
e = 6
While e > 4
e -= 1
d += 1
End While
MessageBox.Show("The Loop ran " & e & "times")
复制代码
Do Loop
Dim str As String
Do Until str = "Cool"
MessageBox.Show("What to do?")
str = "Cool"
Loop
复制代码
欢迎光临 大马资讯论坛 - 马来西亚中文资讯平台 (http://www.freeinfo.com.my/)
Powered by Discuz! X3.3