此問題,是在csdn論壇看到;順便回答,自己記錄起來;以後遇到可用!!
底下範例簡單,但...細看卻可運用在很多判斷機制上唷.
-----------------------------------------------
Public Class Form1
Dim p() As Boolean
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For i As Integer = 0 To UBound(fp)
MessageBox.Show(i & " " & fp(i))
Next
End Sub
Function fp()
'p(1)=false,p(2)=true,p(3)=false,p(4)=false,p(5)=false
ReDim p(4)
p(0) = False
p(1) = True
p(2) = False
p(3) = False
p(4) = False
Return p
End Function
End Class
沒有留言:
張貼留言