Quote:
Originally Posted by cyberninjah
I know ticket counter is not necessary.
I tested with it more with the ticket counter i get more random numbers then without it so thats why i choice to use it =)
|
Unless you using a third party .Net implementation (i.e. one that isn't developed by Microsoft), that is actually impossible. If you use an IL decompiler like dotPeek or .Net Reflector to look at System.Random's implementation, you'll see that when you construct System.Random with the parameterless constructor, it will call the one with the seed parameter using Environment.TickCount as the seed.
You are manually supplying a seed to the random-number generator without any (valid) reason. There's no reason to do this unless you want it to always give you the same sequence of 'randomly' generated numbers. In that case, you should always use the same seed and not Environment.TickCount.
tl;dr: By using Environment.TickCount, you're doing exactly the same thing Microsoft does internally. It will not produce numbers that are 'more random' than when using the parameterless constructor.