Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You open the documentation for System.Random and read the examples, it's just about numbers.
We create a list of numbers from 1 to 10, then we cut out elements from it at random indices and write them to our array.
one.
Random rn = new Random();
var array = Enumerable.Range(0, 10).Select(x => rn.Next(255)).ToArray();
var array = Enumerable.Range(0, 10).OrderBy(x => Guid.NewGuid()).ToArray();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question