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
You want to have a string:
Random r = new Random(); var x = r.Next(0, 1000000); string s = x.ToString("000000");
For example,
x = "2124" s = "002124"