扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
thr_test(i) = New System.Threading.Thread(New System.Threading.ParameterizedThreadStart(Sub()
专注于为中小企业提供成都网站制作、做网站服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业龙华免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了1000+企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。
直接写过程代码
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
注意:参数为动态数组;
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类型的数组
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 "随机产生的数据为:"
For i = 0 To UBound(aTemp)
Print i + 1, aTemp(i)
Next
End Sub
运行效果:
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流