Generate and display 5 random byte (integer) values
Imports System Imports System.Globalization
Public Class MainClass Public Shared Sub Main()
Dim rand As New Random()
Dim bytes(4) As Byte
rand.NextBytes(bytes)
Console.WriteLine("Five random byte values:")
For Each byteValue As Byte In bytes
Console.Write("{0, 5}", byteValue)
Next