To generate Random numbers from 1- 20 I need to pick selective and it should not be repetitive.
How to do this in C#
Note I need to loop through as like this
Just like i did:
list.Clear(); int count = 0; while (count < 20) { int x = Random.Range(1, 21); if (!list.Contains(x)) { list.Add(x); count++; } }