C
CES
I'm sorry because this should be simple. I'm trying to populate an array
with random numbers which is no problem however I can't figure out how to
check to make sure the number is not duplicated in the list???
int[] myArray = new int[5];
Random myRandomNumber = new Random();
for (int x = 0; x < myArray.Length; x++)
{
for(int i = 0; i <= x; i++){
bool myBool = false;
int temp =
myRandomNumber.Next(1, 5);
//
//Check against all populated
elements in array???
//
}
Console.WriteLine();
I've tried for 6 hours but I'm lost????
with random numbers which is no problem however I can't figure out how to
check to make sure the number is not duplicated in the list???
int[] myArray = new int[5];
Random myRandomNumber = new Random();
for (int x = 0; x < myArray.Length; x++)
{
for(int i = 0; i <= x; i++){
bool myBool = false;
int temp =
myRandomNumber.Next(1, 5);
//
//Check against all populated
elements in array???
//
}
Console.WriteLine();
I've tried for 6 hours but I'm lost????