Dim N As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
N = 0
For i = 0 To 3
If GetT(i) = 0 Then
ElseIf GetT(i) = 1 Then
ElseIf GetT(i) = 3 Then
End If
Next
MsgBox(N)
End Sub
Function GetT(ByVal i As Integer) As Integer
N += 1
Return i
End Function
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
N = 0
For i = 0 To 3
Dim T As Integer = GetT(i)
If T = 0 Then
ElseIf T = 1 Then
ElseIf T = 3 Then
End If
Next
MsgBox(N)
End Sub
End Class
|
|
暂时没有评论
| 发表评论 - 不要忘了输入验证码哦! |
用户登陆
站点日历
站点统计
最新评论
if 和elseif 不要重复调用Function [ 日期:2025-11-12 ] [ 来自: