I have searched around for a solution but I just cannot understand those complicated-detailed algorithms as i'm fairly new in c# and right now i'm trying to create this program. I want the random number generator to generate 1 to 4 and it wont repeat the same number to 4 different textbox but when i executed the code as below:-
Random random = new Random();
var numberNo = Enumerable.Range(1, 4);
var shuffled = numberNo.OrderBy( a => random.NextDouble());
txtrnd1.Text = String.Join("",shuffled);
txtrnd2.Text = String.Join("",shuffled);
txtrnd3.Text = String.Join("",shuffled);
txtrnd4.Text = String.Join("",shuffled);
the result that i obtained is (for the 4 textbox : textbox1 will display "1342" ,textbox2 will display "1234" etc) in the textbox but what i want for the result for the 4 textbox is (for example textbox1 will display "1" textbox2 will display "2" etc) in the 4 different textbox so that i can compare it with the user input which i did it in another program of mine
int intrandomnumber1;
Random randomnumber = new Random();
intrandomnumber1 = randomnumber.Next(1, 10);
userinput1.Text = Convert.ToString(intrandomnumber1);
appreciate any help and thanks in advance!