im having problems with the following code
it works fine when i have the sleep in
but without the sleep it writes the same number twice
does this have something to do with the way the computer generates the random number? like based on the computers time?
Greeting:
That a usual problem with random number, the best way to minimize this to use a seed for the random based on the actual time, something like this:
Standard way to create random numbers is to create a Random object in class wide or global scope and use object's Next() method to get next random number.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.