Imports System
Public Module Module1
Public Sub Main()
' In order to create a random number in VB.NET:
' 1. Create a new Random class (line 13)
' 2. Use .Next(a, b) to generate a random number r in the range: a <= r < b (line 16)
' eg to simulate the rolling of a die ten times, use the following code
Dim RandomNum As Integer
Dim RandomClass As New Random(52)
for i = 1 to 10
RandomNum = RandomClass.Next(10, 100)
Console.WriteLine(RandomNum)
next
End Sub
End Module