PostSimple RNG

Posts 13 of 3 · Page 1 of 1
Simple RNG
So I was in need for an RNG (random number generator) so I just decided to make my own.

I plan on releasing this (for free of course) eventually. I do have a bug that I am trying to fix. The bug is if you enter anything besides text the application will crash.

Here is the program -



P.S. If you have any recommendations on how I should fix the bug, please reply to the post or message me.
This isn't really making your own random number generator, you're using .net's built in Random.

Code:
Int32 minValue = 0;
if(!Int32.TryParse(minNumtxt.Text, out minValue)
{
 // invalid input
}
Int32.MaxValue should be a valid value for rng, no need to check for it(or greater, Int32 can't store numbers bigger than that)
What? this is so easy to make

Code:
int value;
Random r = new Random() 
value = r.next(0, 100);
just parse it as string
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?