Hi All, sorry for posting so many questions. Im a newbie but im trying to learn :D
With Regards to SammyB Code :
I tried implementing it into my program but i change this line
iRand = oRand.Next(1,10 ) to iRand = oRand.Next(-0.3,0.3) as i want my range to be from -0.3 to 0.3. However the the value 0 kept appearing when i click the button. Why is it so? I will have to store the random values in an array as well. array(0 To 10919). Is it possible as well?
With Regards to SammyB Code :
Code:
Public Class Form1
Private oRand As Random
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oRand = New Random(DateTime.Now.Millisecond)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim iRand As Integer
iRand = oRand.Next(1, 10)
MsgBox(iRand)
End Sub
End Class
iRand = oRand.Next(1,10 ) to iRand = oRand.Next(-0.3,0.3) as i want my range to be from -0.3 to 0.3. However the the value 0 kept appearing when i click the button. Why is it so? I will have to store the random values in an array as well. array(0 To 10919). Is it possible as well?
Comment