using System;
public class Program
{
public static void Main()
var randomGenerator = new Random();
Byte randomNumber = Convert.ToByte(randomGenerator.Next(1, 100));
// Alternatively, the above can be done as the following if you only need a single number
randomNumber = Convert.ToByte(new Random().Next(1, 100));
// Excuse the String.Format - this site didn't like the string interpolation syntax
Console.WriteLine("The Random Number is {0}", randomNumber);
}