how to randomize a number raging 1~100 in c#?
Printable View
how to randomize a number raging 1~100 in c#?
Random randomNumber = new Random();
int rndNum = randomNumber.Next(1,100);
That works pretty well, I think it goes by time to get the next random number. There are also other things you can do passing in some values to the Random constructor and things to make it even more random....
thanks for help! :) i will try it out! :)