I have two arrays called numbers and sounds. My code is below. When I use random generator, I don't want the same value to be assigned to the sounds array. sounds[0], sounds[1], sounds[3] should have different values all the time. Thanks
string[] numbers ={ "1", "2", "3", "4", "5", "6", "7","8","9","10","11","12","13","14","15","16","17","18","19","20"};
Random r= new Random();
sounds[0] = numbers[r.Next(0, numbers.Count())];
sounds[1] = numbers[r.Next(0, numbers.Count())];
sounds[2] = numbers[r.Next(0, numbers.Count())];