public static int randomValue(int range) { Random rnd = new Random(); int r = 0; r = rnd.Next(range); return r; }