随机数问题
运行结果都是一样的随机数。 请问怎么改下 使得数组存储的是不同随机数啊,菜鸟在线等高手指点Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim arrData(9, 9) As Double
Dim rand As New Random
For i As Integer = 0 To 9
For j As Integer = 0 To 9
arrData(i, j) = rand.NextDouble()
Next
Next
For Each strnNum As String In arrData
For intI = 0 To 9
For intJ = 0 To 9
Console.Write("arrdata[" + intI.ToString + " " + intJ.ToString + "] =" & strnNum)
Next
Console.WriteLine()
Next
Next
End Sub
End Class