for con random en c sahrp code example
Example: generate a random number in c#
Random rnd = new Random();
int value = rnd.Next(min,max);
Console.Write(value);
Random rnd = new Random();
int value = rnd.Next(min,max);
Console.Write(value);