thr_test(i) = New System.Threading.Thread(New System.Threading.ParameterizedThreadStart(Sub()
專注于為中小企業(yè)提供成都網(wǎng)站制作、做網(wǎng)站服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)龍華免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了1000+企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。
直接寫過程代碼
End Sub))
public function createstringarr() as string()
return new string(){"d1","d2","d3","d4"}
end function
public function createstringarr() as string()
return new string(){"d1","d2","d3","d4"}
end function
注意:參數(shù)為動態(tài)數(shù)組;
Private Function MyF(ByRef d() As Integer)
ReDim d(4, 13) As Integer
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim MyNum(4) As Integer
For i = 1 To 4
MyNum(i) = 0
Next i
Randomize
For i = 1 To 4
For j = 1 To 13
n = Int(Rnd * 4 + 1)
Do While MyNum(n) = 13
n = Int(Rnd * 4 + 1)
Loop
d(i, j) = n
MyNum(n) = MyNum(n) + 1
Next j
Next i
End Function
給你一個簡單的示例:
Option?Explicit
Private?Function?GetRndInt()?As?Integer()
'?返回一個?Integer類型的數(shù)組
Dim?i?As?Long,?aTemp()?As?Integer
Randomize
ReDim?aTemp(15)
For?i?=?0?To?15
aTemp(i)?=?Rnd()?*?500
Next
GetRndInt?=?aTemp
End?Function
Private?Sub?Command1_Click()
Dim?aTemp()?As?Integer
Dim?i?As?Long
Me.Cls
aTemp?=?GetRndInt
Print?"隨機(jī)產(chǎn)生的數(shù)據(jù)為:"
For?i?=?0?To?UBound(aTemp)
Print?i?+?1,?aTemp(i)
Next
End?Sub
運(yùn)行效果: