I'm trying to pick two random numbers for assignment 5 of the c# school. I'm using the following codeCode: C# [Select]private void fillFirstBoxes() { userCard1Text.Text = Convert.ToString(functions.GetRandomCard()); dealerCard1Text.Text = Convert.ToString(functions.GetRandomCard()); } ... public class Functions { private int RandomNumber(int min, int max) { Random random = new Random(); return random.Next(min, max); } public int GetRandomCard() { int[] cards = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10 }; int random = RandomNumber(0, 12); return cards[random]; } }The trouble is that 90% of the time the two numbers are the same. Occasionally (about 10% of the time) the numbers are different but it is rare. So what am I doing wrong? I know that computer random isn't really random, but surely it only takes a tick?-mediaguycouk (March 19, 2008, 05:21 PM)

The trouble is that 90% of the time the two numbers are the same. Occasionally (about 10% of the time) the numbers are different but it is rare. So what am I doing wrong? -mediaguycouk (March 19, 2008, 05:21 PM)