I\'ve been searching for a couple of hours and I just can\'t seem to find a answer to this question. I want to generate a random number with 6 digits. Some of you might tell
I agree with the comment above that 000 001 can't be an integer, but can be a string with:
Random generator = new Random(); int r = generator.Next(1, 1000000); string s = r.ToString().PadLeft(6, '0');