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:

example Results

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -