Hello :-)
I've got lame begginer question about generating different random
numbers in C# ;-)
First, some code:
public int test(int lb)
{
int count = 0;
Random randSeed = new Random();
for(int i=0;i<lb;i++)
{
double test = randSeed.NextDouble();
if(test>0.49) {
count++;
}
}
return count;
}
The code _should_ give me all positive scores of 'lb' throws of coin.
And it does. But when called couple of times in the "same" time, like:
test(23); test(12); test(45);
it generates the same scores..
How do i hop over it in C# ? ;-)
--
Best regards.. or not..
Piotr 'Zenobius' Baranowski