Random
is a pseudo-random number generator, which is an algorithm that produces a sequence of numbers that meet certain statistical requirements for randomness. Because the number generated is not random enough for sensitive operations, consider using RandomNumberGenerator
from System.Security.Cryptography
namespace instead.
var random = new Random();
var randomGenerator = RandomNumberGenerator.Create();