Im trying to create a random 6 digit numeric code that will not repeat.
I have tried using guid but that was unsuccessful.
random rnd = new random();
int num = rnd.next(000001,999999);
I would prefer not to use Random , or to have to iterate through all the previous codes to get a code.