c# - Get all the number between two numbers random -
I'm not sure if this question is unique, but I could not find an answer.
I have a good way of getting numbers randomly in C # from 1 to 9 (9), and I have to get all 9 numbers. So I need a function which gives 9 numbers between 1 to 9 and I need each number one time. For example, the result will look like this: 4,3,2,6,9,7, 1,5,8
I will do just that:
var rnd = new random (); Var number = calculation worthy. Range (1, 9). Orderbie (x => rnd.Next ()) .oir (); I found the result of an example:
Comments
Post a Comment