I am using C # in the .NET Framework 3.5 and trying to create a random integer using Random (). My code is here:
using System.Random;
int randomNumber;
Random RNG = new Random();
randomNumber = RNG.Next(1,10);
I think everything should be fine, but I get an error that System.Random is not a valid namespace, but I'm sure it is ...
Does anyone know which problem or some other method I should use to generate a random integer within a range?
source
share