I'm using Random class to generate any random integer number but it always returns the same number
static Random rand = new Random();
public static int GetOrderID()
{
return rand.Next(Math.Abs(int.MinValue + 1), int.MaxValue);
}
notice that the random class is static and generated outside the function
Aucun commentaire:
Enregistrer un commentaire