VB6 Randomize in c#?

chuawenching

Regular
Joined
Jul 26, 2003
Messages
66
Hi there.

How to code VB6 Randomize in c#?

In vb6 rnd function, i use c#:

Random r = new Random();
r.Next();

to replace it!

But how about Randomize?

I heard it had a different meaning over vb6 Rnd();

Any help?

Thanks.

Regards,
Chua Wen Ching :p
 
As far as I know Randomize() just makes sure that the values returned by Rnd() are really random - it "initializes" the Randomnumber Generator...

With the C# Random.Next(); this isn't neccessary anymore because the Randomnumber Generator is already initialized when you create a new Instance of it.

Hope this helps!

Andreas
 
Back
Top