I making a lottery simulation and i have 2 different arrays with 6 numbers to hold firstly the numbers the user wishes to play and secondly the numbers that get generated each run.
The user enters their numbers into a textbox and its saved as a string and placed into respective spots in the aray, the randomly generated nums are also saved as a string into the string array.
After this i have a SequenceEqual for comparison
bool equal = lotteryNums.SequenceEqual(playerNums);
This always returns false, i have set all the generated array elements manually to 1-6 and then the players nums accordingly through the textboxes yet it will always return a false.
The generated array is currently filled like this for testing
lotteryNums[0] = "1";
lotteryNums[1] = "2";
lotteryNums[2] = "3";
lotteryNums[3] = "4";
lotteryNums[4] = "5";
lotteryNums[5] = "6";
The player array is filled like this using the next array position for the next number
string inputNum = inputBox_txt.Text;
playerNums[0] = inputNum;
Why is this always returning false?
Since people are asking the arrays are both in the exact same order and do not appear to contain anything more or anything less than the numbers in the arrays