Generating random, unique values C#

I’m calling NewNumber() regularly, but the problem is I often get repeated numbers. Random.Next doesn’t guarantee the number to be unique. Also your range is from 0 to 10 and chances are you will get duplicate values. May be you can setup a list of int and insert random numbers in the list after checking …

Read more