How to Generates Random Numbers within a range in

Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 206
The below code will do this.It will generate random numbers within a range of 1 to 5

Public Shared Function GetRandomNumbersInRange() As Integer
Dim r As New Random()
Return r.[Next](1, 5)
End Function

Comments or Responses

Login to post response