給你一個簡單的示例:
創(chuàng)新互聯(lián)是一家專業(yè)提供平定企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站制作、做網(wǎng)站、H5建站、小程序制作等業(yè)務(wù)。10年已為平定眾多企業(yè)、政府機構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站制作公司優(yōu)惠進行中。
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?"隨機產(chǎn)生的數(shù)據(jù)為:"
For?i?=?0?To?UBound(aTemp)
Print?i?+?1,?aTemp(i)
Next
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