c# random in array code example
Example 1: random value in array c#
Random random = new Random();
int value = random.Next(0, array.Length);
Console.Write(array[value]);
Example 2: c# random number
Random rnd = new Random();
int number = rnd.Next(1, 10);