Random Class represents a pseudo-random number generator
Imports System
Imports System.Globalization
Public Class MainClass
Public Shared Sub Main()
Dim bytes1(99) As Byte
Dim rnd1 As New Random()
rnd1.NextBytes(bytes1)
For ctr As Integer = bytes1.GetLowerBound(0) to bytes1.GetUpperBound(0)
Console.Write("{0, 5}", bytes1(ctr))
If (ctr + 1) Mod 10 = 0 Then Console.WriteLine()
Next
End Sub 'Main
End Class
Related examples in the same category