Random code is simple
internal static readonly Random Rng = new Random(unchecked((int)DateTime.Now.Ticks));
/// <summary>
/// Return Random number.
/// </summary>
/// <param name="from">From.</param>
/// <param name="to">To.</param>
/// <returns>System.Int32.</returns>
public static int Random(int from, int to)
{
try
{
return Rng.Next(from, to + 1);
}
catch (Exception exception)
{
Logging.WriteError("Random(int from, int to): " + exception);
}
return 0;
}
What is your value of
unchecked((int)DateTime.Now.Ticks)