I
I
Imronsfrv2021-06-11 09:01:50
random numbers
Imronsfrv, 2021-06-11 09:01:50

How to fix non-repeating in random c#?

For example:
Random rnd = new Random();
var number = rnd.Next(0, 10);
label1.Text = number.ToString();
In the label, if 5 appears more than 5 is not repeated

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2021-06-11
@inoise

Collect an array of values, shuffle, output in order

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question