c# list random pos 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: how to generate random numbers in c#
//works in visual studio for unity
int randomNumber = UnityEngine.Random.Range(1, 100); //Random number between 1 and 99